Last active
October 1, 2018 10:58
-
-
Save vegetablesalad/a2e6752748c3c020df2e8725cc5c6dd4 to your computer and use it in GitHub Desktop.
package.json for merging local and remote schemas + generate typings for typescript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"graphql": "yarn merge-graphql-schema;yarn generate-graphql-schema-json;yarn generate-graphql-schema-typings", | |
"merge-graphql-schema": "cd graphql;rm final.schema.graphql;get-graphql-schema http://my.remote.schema:3030/graphql > remote.merge.schema.graphql;gql merge **/*.graphql > final.schema.graphql", | |
"generate-graphql-schema-json": "cd graphql;apollo-codegen introspect-schema final.schema.graphql --output schema.json", | |
"generate-graphql-schema-typings": "cd graphql;gql-gen --schema schema.json --template typescript --out ../typings/graphql.d.ts;rm schema.json", | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment