For the type generation to work, GraphQL queries have to have a unique name.
works:
query GetCustomer {
customer {
firstName
lastName
}
}
doesn't work:
query {
customer {
firstName
lastName
}
}
Since we control the type generation and have access to the originating file name, contents, etc. it would be possible to auto-generate missing query names. This should be behind a configuration flag, but if it turns out to be viable and stable it should be enabled by default with a possibility to opt-out.
Name generation has to be unique enough that multiple queries can be created in the same file without a name and still get the correct types.
For the type generation to work, GraphQL queries have to have a unique name.
works:
doesn't work:
Since we control the type generation and have access to the originating file name, contents, etc. it would be possible to auto-generate missing query names. This should be behind a configuration flag, but if it turns out to be viable and stable it should be enabled by default with a possibility to opt-out.
Name generation has to be unique enough that multiple queries can be created in the same file without a name and still get the correct types.