|
2 years ago | |
---|---|---|
app | 2 years ago | |
nix | 2 years ago | |
src | 2 years ago | |
test | 2 years ago | |
.gitignore | 2 years ago | |
CHANGELOG.md | 2 years ago | |
LICENSE | 2 years ago | |
README.md | 2 years ago | |
Setup.hs | 2 years ago | |
default.nix | 2 years ago | |
graphql-seamstress.cabal | 2 years ago | |
release.nix | 2 years ago | |
shell.nix | 2 years ago | |
stack.yaml | 2 years ago | |
static.nix | 2 years ago |
This CLI tool will stitch your schemas if and only if they are organized this way
+--my-schema-dir
|--person.gql
|--dog.gql
|--post.gql
( etc.. )
Graphql Schema Seamstress: A graphql schema stitcher.
Usage: graphql-seamstress --src-dir ARG --output ARG
Graphql Schema Seamstress is a cli tool that will stitch all your schema
them into one file.
Available options:
-h,--help Show this help text
--src-dir ARG Schema source directory path.
--output ARG Output path for the schema stitched result.
Running this command will result in stitching all the schemas in test/test-schema
graphql-seamstress --src-dir test/test-schema --output my-schema.gql
The result will look like
"""
File generated by Graphql Schema Seamstress
"""
type Person {
firstName: String
lastName: String
}
type Post {
author: String
comment: String
}
type Dog {
name: String
}
type Query {
dog: String
posts: [Post]
getPerson(name: String): Person
}
type Mutation {
addPost(author: String, comment: String): Post
setDogName(name: String): Dog
setPersonName(name: String): Person
}
type Subscription {
postAdded: Post
}
schema {
query: Query
mutation: Mutation
subscription: Subscription
}
With Nix
nix-shell
Once you are in a nix shell
cabal build
cabal install # installs in .cabal/bin
Without going into a nix-shell
nix-build static.nix