You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Custom scalars and input objects used in directives are not scanned, and subsequently their type cannot be determined when building directives in SchemaParser
graphql.kickstart.tools.SchemaError: Expected type 'CustomScalar' to be a GraphQLInputType, but it wasn't! Was a type only permitted for object types incorrectly used as an input type, or vice-versa?
This causes apollo-federated schemas to fail because _FieldSet is only used in directives.
Caused by: graphql.kickstart.tools.SchemaError: Expected type '_FieldSet' to be a GraphQLInputType, but it wasn't! Was a type only permitted for object types incorrectly used as an input type, or vice-versa?
at graphql.kickstart.tools.SchemaParser.determineType(SchemaParser.kt:355) ~[graphql-java-tools-13.0.0.jar:na]
at graphql.kickstart.tools.SchemaParser.determineInputType(SchemaParser.kt:373) ~[graphql-java-tools-13.0.0.jar:na]
at graphql.kickstart.tools.SchemaParser.determineInputType(SchemaParser.kt:365) ~[graphql-java-tools-13.0.0.jar:na]
at graphql.kickstart.tools.SchemaParser.createDirective(SchemaParser.kt:307) ~[graphql-java-tools-13.0.0.jar:na]
at graphql.kickstart.tools.SchemaParser.parseSchemaObjects(SchemaParser.kt:83) ~[graphql-java-tools-13.0.0.jar:na]
at graphql.kickstart.tools.SchemaParser.makeExecutableSchema(SchemaParser.kt:110) ~[graphql-java-tools-13.0.0.jar:na]
This should be partially resolved by #763 for scalars.
However, directives with input object arguments/parameters are still not supported (this was the case even before the applied directives change)
This should be partially resolved by #763 for scalars. However, directives with input object arguments/parameters are still not supported (this was the case even before the applied directives change)
Activity
enriquedacostacambio commentedon Aug 25, 2022
This causes apollo-federated schemas to fail because
_FieldSetis only used in directives.enriquedacostacambio commentedon Sep 7, 2022
this can be reproduced with:
enriquedacostacambio commentedon Sep 30, 2022
@oryan-block is this easy to fix? i never coded in kotlin but if you give me a few pointers I can give it a shot.
oryan-block commentedon Oct 3, 2022
Unfortunately because of the way the scanner works and how different directives are from everything else, this is not a trivial fix.
anbusampath commentedon Dec 6, 2022
#725
oryan-block commentedon Sep 18, 2023
This should be partially resolved by #763 for scalars.
However, directives with input object arguments/parameters are still not supported (this was the case even before the applied directives change)
airvine-r7 commentedon Sep 20, 2023
@oryan-block Any updates on this or work arounds?
oryan-block commentedon Sep 20, 2023
@airvine-r7 that fix is merged. You can test it now.
#764 is a more complete solution I think should make directives fully supported.