graphql-for-vscode
graphql-for-vscode copied to clipboard
Types are not merged when extended
My .gqlconfig has schema files as following
schema: {
files: {include: ['libs/schema/src/**/*.gql', 'app/src/client-schema.gql']}
}
and I have the Query defined inside ../schema
folder
type Query {
item: Item!
items: [Items!]!
}
and I have the Query defined inside ../app/src/clientschema.gql
extend type Query {
selectedItems : [Items!]
}
Now, I am writing a query which look like
query Cart {
items{
...
}
selectedItems @client{
...
}
}
The above scenario is working fine with gql-gen
tool and the app which is wriiten in angular app. The issue is that the VSCode GraphQL is not recognizing the sectedItems and giving linting error.
Expected, merge the types when it is extended using extend
, I hope which is not hapening now.
Good issue. I think the correct place for this would be the @playlyfe/gql language server repo. @Mayank1791989 is that correct?
https://github.com/Mayank1791989/gql/issues/45
For those winding up here, it looks like this project is largely abandoned, with a more current VS Code plugin here:
https://marketplace.visualstudio.com/items?itemName=GraphQL.vscode-graphql