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
Describe the bug
Not explicitly defining "method": "POST" in tsconfig.json causes npx ts-graphql-plugin validate --verbose to fail. On top of that, it fails with a wrong error message so it took me a good half hour to figure out. It fails with the following error message:
error: No GraphQL schema. Confirm your ts-graphql-plugin's "schema" configuration at tsconfig.json's compilerOptions.plugins section.
To Reproduce
Use schema over http without explicitly specifying method, like:
"plugins": [
{
"name": "ts-graphql-plugin",
"schema": {
"http": {
"url": "http://xy.com/graphql", // whatever your graphql endpoint is// "method": "POST" // do not specify it explicitly and it will fail
}
},
"tag": "gql"
}
]
Expected behavior
I've read in the documentation that one can omit "method": "POST" from tsconfig.json since that is the default. If that is not explicitly written in config, plugin silently fails, even with verbose flag. Either the documentation could be updated (willing to do a PR if needed) and error message could be updated, or it should be fixed in the package to fallback to POST even if not explicitly defined.
PS: great plugin and keep it going, thanks for your work.
The text was updated successfully, but these errors were encountered:
Describe the bug
Not explicitly defining
"method": "POST"
intsconfig.json
causesnpx ts-graphql-plugin validate --verbose
to fail. On top of that, it fails with a wrong error message so it took me a good half hour to figure out. It fails with the following error message:To Reproduce
Use schema over http without explicitly specifying method, like:
Expected behavior
I've read in the documentation that one can omit
"method": "POST"
fromtsconfig.json
since that is the default. If that is not explicitly written in config, plugin silently fails, even with verbose flag. Either the documentation could be updated (willing to do a PR if needed) and error message could be updated, or it should be fixed in the package to fallback toPOST
even if not explicitly defined.PS: great plugin and keep it going, thanks for your work.
The text was updated successfully, but these errors were encountered: