Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expected 2-3 arguments, but got 1. #468

Closed
jjangga0214 opened this issue Jan 24, 2020 · 2 comments
Closed

Expected 2-3 arguments, but got 1. #468

jjangga0214 opened this issue Jan 24, 2020 · 2 comments

Comments

@jjangga0214
Copy link

jjangga0214 commented Jan 24, 2020

Info: 1.0.0-beta.1

Bug

const schema = await importSchema('graphql/schema/schema.graphql')

When using typescript, this throws an error Expected 2-3 arguments, but got 1.ts(2554).
I believe this is a type bug, as additional arguments are intended to be optional, aren't they?

Workaround

Just add an empty object as second argument.

const schema = await importSchema('graphql/schema/schema.graphql', {})
@ardatan
Copy link
Owner

ardatan commented Jan 28, 2020

Fixed in v1.0.0-beta.2.

@ardatan
Copy link
Owner

ardatan commented Mar 17, 2020

Available in 1.0.0!

@ardatan ardatan closed this as completed Mar 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants