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
type Company {
id: ID!
}
type Hotel {
id: ID!
}
type Query {
companies: [Company]!
hotels: [Hotel]!
}
> graphql-inspector validate ./client/**/*.graphql ./schema.graphql
Error:
Unable to find any GraphQL type definitions for the following pointers:
- ./client/hotels.graphql
at prepareResult (/Users/username/.npm/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/load/index.cjs.js:591:15)
at loadTypedefs (/Users/username/.npm/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/load/index.cjs.js:556:12)
at async Object.loadSchema (/Users/username/.npm/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/load/index.cjs.js:641:21)
Second Approach
But, if I create a documents.graphql, then it passes.
documents.graphql
query getCompanies {
companies {
id
}
}
query getHotels {
hotels {
id
}
}
> graphql-inspector validate ./documents.graphql ./schema.graphql
success All documents are valid
I am getting the same error. But for me if I run the validate command in the terminal, it works perfectly fine. But when I add it as a npm script in the package.json, it gives the following error: Error:
Unable to find any GraphQL type definitions for the following pointers:
- ./schema/graphql/apps/apps.graphqls
at prepareResult (/usr/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/load/index.cjs.js:591:15)
at loadTypedefs (/usr/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/load/index.cjs.js:556:12)
at async Object.loadSchema (/usr/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/load/index.cjs.js:641:21)
Describe the bug
Unable to find any GraphQL type definitions for the following pointers
The following errors out when use
wildcard
.Although when I copy/paste all the
graphql
queries/mutations intodocument.graphql
, it never errors out.To Reproduce
Steps to reproduce the behavior:
client/queries/companies.graphql
client/queries/hotels.graphql
schema.graphql
But, if I create a
documents.graphql
, then it passes.documents.graphql
Expected behavior
The first case should pass based on the documentations
Environment:
@graphql-inspector/...
: 2.9.0graphql
: 15.5.3Additional context
The text was updated successfully, but these errors were encountered: