Extended enum values are not recognized
See original GitHub issueI really appreciate this plugin and I’m not trying to be a bother with opening issues left and right, but I did notice another thing about enums.
Version and Environment Details
Operation system: macOS Mojave 10.14.6
IDE name and version: Webstorm 2019.2.3
Plugin version: 2.2.0
Expected Behaviour
When extending an enum type by extend enum MyEnum {EXTRA_VALUE}
, the plugin should correctly recognize EXTRA_VALUE
as a value of MyEnum
.
Actual Behaviour
The plugin displays an error for every value which is not present in the original definition of the enum.
Steps to Reproduce / Link to Repo with Reproduction and Instructions
type User {
id: ID
email: String
}
enum AuthRoles {
USER
CREW
ADMIN
}
extend enum AuthRoles {
AUTHENTICATED
CURRENT_USER
OR
AND
NOT
}
type Query {
getUser(id: ID!): User @auth(if: [ADMIN OR CREW OR CURRENT_USER])
}
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5
Top Results From Across the Web
Extended enum values are not recognized · Issue #293 - GitHub
When extending an enum type by extend enum MyEnum {EXTRA_VALUE} , the plugin should correctly recognize EXTRA_VALUE as a value of MyEnum ....
Read more >c# - Enum Extension Method is not showing - Stack Overflow
Extension methods can be applied on instances only public static class EnumExtensions { // This extension method requires "value" argument ...
Read more >Problem with List<Enum> Extension - MSDN - Microsoft
Hello,. I have the following extension: public static SelectList ToSelectList(this IEnumerable<Enum> source) { } // ToSelectList.
Read more >How to extend enums in TypeScript - LogRocket Blog
Can you extend enums? The short answer is no, you can't extend enums because TypeScript offers no language feature to extend them. However, ......
Read more >Extending Enums in Java - Baeldung
In this tutorial, we'll discuss extending enums in Java, including adding new constant values and new functionalities.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+1
Fixed in 3.0.0.