Dynamic type modifiers not respected?
See original GitHub issueI’m trying to declare the types of my type fields using the constructors for NonNullType
, StringType
, etc and finding that the type modifiers (NonNullType
and ListType
) aren’t being respected when declaring them this way.
eg. If I use the Star Wars template example, and in line 20 of QueryType.cs change the statement from:
descriptor.Field(t => t.GetCharacter(default, default))
.Type<NonNullType<ListType<NonNullType<CharacterType>>>>()
.Argument("characterIds",
a => a.Type<NonNullType<ListType<NonNullType<IdType>>>>());
to:
descriptor.Field(t => t.GetCharacter(default, default))
.Type<NonNullType<ListType<NonNullType<CharacterType>>>>()
.Argument("characterIds",
a => a.Type(new NonNullType(new ListType(new NonNullType(new IdType())))));
then I see that the field definition for characterIds
in Query
becomes just:
character(characterIds: ID): [Character!]!
ie. the input type is ID
rather than [ID!]!
. I’m not sure if this is supposed to work but I note that the style appears to work for normal types (and is extremely helpful for constructing the schema dynamically), just not the modifiers.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Dynamic type modifiers not respected? · Issue #689
I'm trying to declare the types of my type fields using the constructors for NonNullType, StringType, etc and finding that the type ......
Read more >Idea: Public Access Modifier Respected in Type Definition
It is a deliberate design decision that public types do not automatically expose members without explicit access modifiers; this has been ...
Read more >Chapter 2: Dynamic modifiers, effects, collections and ...
This is the second chapter of my guide on modifiers, explaining the underlying anatomy of the modifiers system including dynamic modifiers ...
Read more >Jetpack Compose Tricks: Conditionally Applying Modifiers ...
Jetpack Compose Tricks: Conditionally Applying Modifiers for Dynamic UIs. Streamline your UI code. Katie Barnett.
Read more >c# - Dynamic method access modifier
The UDPManager has certain events that can be subscribed to and I do not want them available if these events are not relevant,...
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
we skipped 0.8.3 and I overlooked this one… I moved it to the current stream.
We will look at dynamic Schemas after 11. We will however look at better ways to enable this. I am closing this issue and we will create a new issue lining out our idea around this.