Skip to content

Fixed javascript code snippet #1239

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

Merged
merged 1 commit into from
May 22, 2022
Merged

Fixed javascript code snippet #1239

merged 1 commit into from
May 22, 2022

Conversation

goncharov-vlad
Copy link
Contributor

Description

The snippet was not correct, it throws this error:
Error: Expected undefined to be a GraphQL schema.

The reason is that we passed configuration as params of qraphql function, but the function takes only one param - an object of the parameters.

See type declaration of the function by permalink bellow
https://github.com/graphql/graphql-js/blob/c7d7026982ceee536900a24ae31235127560297a/src/graphql.ts#L70

The snippet was not correct, it throws this error:
Error: Expected undefined to be a GraphQL schema.

The reason is that we passed configuration as params of qraphql function, but the function takes only one param - an object of the parameters.

See type declaration of the function by permalink bellow
https://github.com/graphql/graphql-js/blob/c7d7026982ceee536900a24ae31235127560297a/src/graphql.ts#L70
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented May 21, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: goncharov-vlad / name: Гончаров (dfe6e5e)

@orta orta merged commit 6dfda7c into graphql:source May 22, 2022
@orta
Copy link
Member

orta commented May 22, 2022

This looks good to me, thanks for the writeup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants