Giter VIP home page Giter VIP logo

Comments (1)

tonyfromundefined avatar tonyfromundefined commented on May 24, 2024

Receiving the GraphQL schema and automatically generating code through it should only work when the schema of the GraphQL API changes. Therefore, we need to watch the GraphQL schema, which is not related to the client code.

Therefore, the feature you mentioned is not going to be implemented later. If you want to generate code generation before yarn dev, add yarn generate to scripts.predev in package.json

{
  "scripts": {
    "predev": "yarn generate",
    "dev": "node ./index.js",
    "prebuild": "rimraf ./dist",
    "build": "next build ./src",
    "postbuild": "parallel-webpack",
    "deploy:dev": "sls deploy --stage dev",
    "deploy:stage": "NODE_ENV=production sls deploy --stage stage",
    "deploy:prod": "NODE_ENV=production sls deploy --stage prod",
    "lint": "tslint --project '.'",
    "pregenerate": "get-graphql-schema `dotenv -e .env.development -p NEXT_APP_GRAPHQL_ENDPOINT` > ./src/generated/schema.graphql",
    "generate": "graphql-codegen --config codegen.yml"
  }
}

But, I didn't update it in this repository. Because, yarn dev should work normally even when offline.

from next-starter.

Related Issues (4)

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.