Comments (3)
I have managed to find that when running the get-graphql-schema
in Github Actions it is adding the script as the first line of the file. I can remove this via an additional script, but unsure why it is being added?
Resulting schema.graphql
$ /home/runner/work/<company-name>/<app-name>/node_modules/.bin/relay-compiler --schema schema.graphql --src src
schema {
query: query_root
mutation: mutation_root
subscription: subscription_root
}
...
This doesn't occur locally instead, I get the following (as expected).
schema {
query: query_root
mutation: mutation_root
subscription: subscription_root
}
...
from get-graphql-schema.
I have managed to find that when running the
get-graphql-schema
in Github Actions it is adding the script as the first line of the file. I can remove this via an additional script, but unsure why it is being added?Resulting
schema.graphql
$ /home/runner/work/<company-name>/<app-name>/node_modules/.bin/relay-compiler --schema schema.graphql --src src schema { query: query_root mutation: mutation_root subscription: subscription_root } ...
This doesn't occur locally instead, I get the following (as expected).
schema { query: query_root mutation: mutation_root subscription: subscription_root } ...
Hi there! Could you explain how you managed to delete that first line that broke everything, please?. Have the same issue.
from get-graphql-schema.
There is a cleaner way to remove the "first line that breaks everything". When you run yarn run X
, yarn wraps the output of your script with a header and a footer - the header is what breaks your script.
There's a silent flag you can add that fixes this issue:
scripts: {
"print-schema": "yarn -s get-graphql-schema http://localhost:3000/graphql > ./data/schema.graphql",
}
From Yarn docs:
-s, --silent skip Yarn console logs, other types of logs (script output) will be printed
from get-graphql-schema.
Related Issues (20)
- Add support for sending via multipart/form-data HOT 1
- Does not support invalid SSL certificates HOT 2
- Use newer version of graphql HOT 1
- get-graphql-schema Relay Schema with commas for multiple inheritance separators rejected by FB Relay Compiler HOT 3
- TypeError: Cannot read property '__schema' of undefined HOT 1
- Basic auth doesn't quite work
- Error with JSON HOT 2
- schema.graphql generated as UTF-16 LE HOT 6
- Error: []
- Cannot use GET method to get schema: "Request with GET/HEAD method cannot have body"
- FetchError: invalid json response body at http://localhost:4000/graphql reason: Unexpected token < in JSON at position 0 HOT 3
- unicode replacement character
- Introspect the multiple gql api HOT 1
- move graphql to peerDependency
- Include depreciated input values in introspection query
- Add option to normalize the retrieved schema for usage in VCS
- Does this tool support for Mac M1? HOT 6
- Cannnot generate schema from endpoints having invalid and self-signed certificates
- Unknown option '--depthLimit'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from get-graphql-schema.