Giter Club home page Giter Club logo

Comments (1)

idosius avatar idosius commented on July 30, 2024

In fact, it seems like the wrong types are generated.

I'm using Gatsby + Contentful. When I look at the possible GQL queries via http://localhost:8000/___graphql for some allContentful* query, then there is no entry.sys.id. However, there is an entry.id.

This is not reflected at all in the generated contentful.d.ts, thus there is a mismatch between the actual type returned by a GQL query in Gatsby vs. the generated types.

Gatsby debug info:

  System:
    OS: macOS 11.4
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.17.3 - ~/.nvm/versions/node/v14.17.3/bin/node
    npm: 6.14.13 - ~/.nvm/versions/node/v14.17.3/bin/npm
  Languages:
    Python: 2.7.16 - /usr/bin/python
  Browsers:
    Chrome: 92.0.4515.131
    Edge: 92.0.902.67
    Firefox: 89.0.2
    Safari: 14.1.1
  npmPackages:
    gatsby: ^3.10.1 => 3.10.2 
    gatsby-background-image: ^1.5.3 => 1.5.3 
    gatsby-plugin-gatsby-cloud: ^2.10.1 => 2.10.1 
    gatsby-plugin-image: ^1.10.1 => 1.10.1 
    gatsby-plugin-react-helmet: ^4.10.0 => 4.10.0 
    gatsby-plugin-sharp: ^3.10.2 => 3.10.2 
    gatsby-plugin-styled-components: ^4.10.0 => 4.10.0 
    gatsby-source-contentful: ^5.10.0 => 5.10.0 
    gatsby-transformer-remark: ^4.7.0 => 4.7.0 
    gatsby-transformer-sharp: ^3.10.0 => 3.10.0 
  npmGlobalPackages:
    gatsby-cli: 3.10.0

from contentful-typescript-codegen.

Related Issues (20)

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.