dotansimha / dotansimha/graphql-code-generator
loadSchema function cannot accept array of pointers in Typescript declaration files
- Dominant language
- TypeScript
- Stars
- 11.3k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 23
Description
### Which packages are impacted by your issue?
@graphql-codegen/cli
### Describe the bug
Function `loadSchema` should support array of pointers as an argument. The function support this behaviour, but the types are not.
https://github.com/dotansimha/graphql-code-generator/blob/b73ed8f18cf55d00640617f7bc5c33d5cfc88663/packages/graphql-codegen-cli/src/load.ts#L31
The same problem in method `loadSchema` in `CodegenContext` class. It should be Types.Schema[].
https://github.com/dotansimha/graphql-code-generator/blob/b73ed8f18cf55d00640617f7bc5c33d5cfc88663/packages/graphql-codegen-cli/src/config.ts#L425
`loadSchema` from `@graphql-tools/load` supports array of pointers too.
https://github.com/ardatan/graphql-tools/blob/66b6a98d7e134e932f28e7788b4884d2c0461b12/packages/load/src/schema.ts#L45
### Your Example Website or App
-
### Steps to Reproduce the Bug or Issue
`loadSchema(['src/schema-1.graphql', 'src/schema-2.graphql']` shows error
### Expected behavior
`loadSchema(['src/schema-1.graphql', 'src/schema-2.graphql']` don't show error
### Screenshots or Videos
_No response_
### Platform
- OS: [e.g. macOS, Windows, Linux]
- NodeJS: [e.g. 18.5.0]
- `graphql` version: [e.g. 16.3.0]
- `@graphql-codegen/*` version(s): [e.g. 2.6.2]
### Codegen Config File
_No response_
### Additional context
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.