Giter Club home page Giter Club logo

Comments (2)

kgoggin avatar kgoggin commented on July 23, 2024

@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.

idkjs avatar idkjs commented on July 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.