When dynamically adding fields using the GraphQLObjectType_fields hook, a type is required.
However, creating a type using the existing api is quite intricate. For example, creating a type like [Orders!]! requires something along these lines: new build.graphql.GraphQLNonNull(new build.graphql.GraphQLList(new build.graphql.GraphQLNonNull(build.getTypeByName('Orders'))))
Maybe a utility method to parse a type string like '[Orders!]!' and return a type instance?
Feature description
When dynamically adding fields using the GraphQLObjectType_fields hook, a type is required.
However, creating a type using the existing api is quite intricate. For example, creating a type like
[Orders!]!
requires something along these lines:new build.graphql.GraphQLNonNull(new build.graphql.GraphQLList(new build.graphql.GraphQLNonNull(build.getTypeByName('Orders'))))
Maybe a utility method to parse a type string like
'[Orders!]!'
and return a type instance?Motivating example
See https://discord.com/channels/489127045289476126/1296863704364879902/1298239516821426236
Breaking changes
Don't think so
Supporting development
I [tick all that apply]: