dotansimha / dotansimha/graphql-code-generator
Failed to load schema, no error output
- Dominant language
- TypeScript
- Stars
- 11.3k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 23
Description
### Describe the bug
I had a schema from AppSync which includes an AWSJSON scalar type. If I don't define that type, graphql-codegen fails with absolutely no indication of why, just that it "Failed to load schema"
### Your Example Website or App
https://codesandbox.io/s/inspiring-panna-ixxqrr?file=/schema.graphql
### Steps to Reproduce the Bug or Issue
1. Open the codesandbox link.
2. Run `yarn generate`
3. Notice the output:

### Expected behavior
Some sort of error indicating an unresolved type of `AWSJSON`. If I change that prop in the schema to be a `String`, everything works just fine.
### Screenshots or Videos
_No response_
### Platform
- OS: macOS
- NodeJS: 16.16.0
- `graphql` version: 16.5.0
- `@graphql-codegen/*` version(s): [e.g. 2.6.2]
"@graphql-codegen/cli": "^2.9.1",
"@graphql-codegen/typed-document-node": "^2.3.2",
"@graphql-codegen/typescript-operations": "^2.5.2",
### Codegen Config File
overwrite: true
schema:
- src/generated/foo.graphql
documents: null
generates:
src/generated/graphql.ts:
plugins:
- typescript
- typescript-operations
- typed-document-node
config:
preResolveTypes: true
### Additional context
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.