Skip to content

Support localSchemaFile flag to push to a service from local schema#710

Merged
trevor-scheer merged 4 commits intomasterfrom
trevor/fix-push-local-schema
Nov 16, 2018
Merged

Support localSchemaFile flag to push to a service from local schema#710
trevor-scheer merged 4 commits intomasterfrom
trevor/fix-push-local-schema

Conversation

@trevor-scheer
Copy link
Copy Markdown
Contributor

@trevor-scheer trevor-scheer commented Nov 15, 2018

Pushing from a local schema was previously supported through the CLI via the --endpoint flag. We could continue to support that through some logic where we parse that flag but instead I've chosen to add a new flag that's more semantic and less magic.

This PR also allows client:codegen to point to a local schema from the CLI with the same flag.

  • Tested and successfully published with a local .gql schema using the --localSchemaFile flag.
  • Tested and successfully generated typescript types with a local .gql schema using the same flag.

Fixes #672

Pushing from a local schema was previously supported through the CLI via
the --endpoint flag. We could continue to support that through some logic
where we parse that flag but instead I've chosen to add a new flag that's
more semantic and less magic.
Comment thread packages/apollo/src/commands/client/codegen.ts Outdated
Comment thread packages/apollo/src/Command.ts
Comment thread packages/apollo/src/Command.ts
* Improve descriptions for localSchemaFile flag
* Clean up logic for setting defaults on the config
* Add Flags type in another spot
@trevor-scheer trevor-scheer force-pushed the trevor/fix-push-local-schema branch from 6ceadfa to a7557af Compare November 16, 2018 03:33
@trevor-scheer trevor-scheer merged commit a0a26a1 into master Nov 16, 2018
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