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

endpointName option getting passed to get-schema command using nps #228

Closed
donovanhiland opened this issue Feb 27, 2018 · 3 comments
Closed

Comments

@donovanhiland
Copy link

Running graphql get-schema from nps fails yargs validation passing an endpointName option through.

Issue opened on nps as well. See: sezna/nps#169

@donovanhiland
Copy link
Author

donovanhiland commented Feb 27, 2018

So after digging in a little I have some more information. At some point during installation I got the error message:

You have to specify endpoint name or define GRAPHQL_CONFIG_ENDPOINT_NAME enviroment variable

So I went ahead and defined GRAPHQL_CONFIG_ENDPOINT_NAME. The problem with this it seems is that yargs is parsing out endpointName
https://github.com/graphql-cli/graphql-cli/blob/dd2578ed0505ac0658924f68d2d521d4c063bdc8/src/bin.ts#L10
and passing it down as an option. Which fails on
https://github.com/graphql-cli/graphql-cli/blob/dd2578ed0505ac0658924f68d2d521d4c063bdc8/src/bin.ts#L11
I'm not sure why this works with plain npm scripts and not with nps.

Changing my env var to GRAPHQL_CONFIG_ENDPOINT to match the expected command endpoint seems to work.

@Urigo
Copy link
Owner

Urigo commented Oct 29, 2019

We've just released a new version and an alpha release channel for GraphQL CLI - 4.0.0-alpha.XXX!

We've changed the get-schema command to use GraphQL Code Generator plugin of GraphQL CLI with the Codegen's schema-ast plugin.

Could you check if it works well for you in the new structure?

Checkout new instructions and the migration guide and we will be happy to hear your feedback during the alpha period!

Feel free to contact us by opening an issue or using our Discord channel;
https://discord.gg/xud7bH

@Urigo
Copy link
Owner

Urigo commented Oct 29, 2019

I've posted the wrong Discord link, this is the correct one: https://discord.gg/xud7bH9

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

No branches or pull requests

3 participants