Comments (2)
@idkjs Thanks so much for testing it out for me! This error turned out to be due to the SpaceX schema having field names that were reserved words in Reason (specifically end
and class
). I updated the list of these and was able to get it to build!
For the error formatting: I'd originally been running parseRE
and printRE
on the output of the codegen, which works essentially like refmt
to prettify the generated code, but it'll fail if there's a syntax error. Right now I've taken that check out so that the codegen will always "work", but the result might have Reason errors.
I'm not sure of the best way to address this moving forward, but I'll look into if there's a better way to output the error from parseRE
- it seems pretty nice to catch that stuff at generation time, I think?
Really appreciate you helping me kick the tires on this! I'm mostly testing it against the non-trivial schema I'm working with at my day job but it does seem really helpful to throw some other tests at it as well... I wonder if it'd even be worth adding some to the test suite somehow?
from graphql-codegen-reason.
I just tried running this same test again and getting this error:
reproduction
codegen-test node_modules/.bin/gql-gen ✔ Parse configuration
❯ Generate outputs
❯ Generate src/GraphQLTypes.re
✔ Load GraphQL schemas
✔ Load GraphQL documents
✖ Generate
→ Unable to find template plugin matching reason-client
Found 1 error
✖ src/GraphQLTypes.re
Unable to find template plugin matching 'reason-client'
Install one of the following packages:
- graphql-codegen-reason-client
- graphql-codegen-reason-client-template
- codegen-reason-client
- codegen-reason-client-template
- reason-client
Something went wrong
➜ codegen-test
You are probably just moving things around.
from graphql-codegen-reason.
Related Issues (13)
- Remove dependency on lodash
- Provide an option for running refmt on the generated output
- Implement ability to generate variables from Graphql Documents
- Provide option to eliminate input types not in use
- `Node` type HOT 1
- Add refetch to query response type
- Document need to include `__typename` in all queries
- Duplicate "graphql" modules cannot be used at the same time
- Update exceptions to be more meaningful
- ReScript compatibility? HOT 1
- List reason plugin in graphql-code-generator.com
- Update plugin to be compatible with graphql-codegen v1.0
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 graphql-codegen-reason.