We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eeb8ff4 commit f9d4ff8Copy full SHA for f9d4ff8
graphql-api-generator/utils/utils.py
@@ -223,6 +223,9 @@ def add_key_input_types(schema: GraphQLSchema):
223
for key in keys[:1]:
224
make_types += f'input _KeyFor{_type.name} '
225
extend_fields += f'\nextend input _KeyFor{_type.name} {{ '
226
+ for key_field in key:
227
+ if key_field not in _type.fields:
228
+ raise Exception(f'Field "{key_field}" in @key directive for {_type} is not a field of {_type}!')
229
for field_name, field in _type.fields.items():
230
# TODO: Modify this if we need to verify that the key fields are in the object
231
if field_name not in key:
0 commit comments