gatsbyjs / gatsby

The best React-based framework with performance, scalability and security built in.
https://www.gatsbyjs.com
MIT License
55.28k stars 10.31k forks source link

(www) Conflicting types on dot-org graphql schema #20925

Closed tesseralis closed 4 years ago

tesseralis commented 4 years ago

Description

warn There are conflicting field types in your data.

If you have explicitly defined a type for those fields, you
 can safely ignore this warning message.
Otherwise, Gatsby will omit those fields from the GraphQL
schema.

NPMPackage.types.ts:
 - type: boolean
   value: false
 - type: string
   value: 'included'

Steps to reproduce

Run gatsby develop on www.

Expected result

No warnings.

Actual result

The above warning.

Environment

  System:
    OS: macOS Mojave 10.14.6
    CPU: (4) x64 Intel(R) Core(TM) i7-4558U CPU @ 2.80GHz
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 10.16.1 - /usr/local/bin/node
    Yarn: 1.19.1 - ~/.yarn/bin/yarn
    npm: 6.13.6 - /usr/local/bin/npm
  Languages:
    Python: 2.7.16 - /usr/bin/python
  Browsers:
    Chrome: 79.0.3945.130
    Firefox: 70.0.1
    Safari: 13.0.4
  npmPackages:
    gatsby: ^2.18.8 => 2.18.22 
    gatsby-design-tokens: ~1.0.10 => 1.0.10 
    gatsby-image: ^2.2.34 => 2.2.38 
    gatsby-plugin-canonical-urls: ^2.1.16 => 2.1.19 
    gatsby-plugin-catch-links: ^2.1.19 => 2.1.24 
    gatsby-plugin-emotion: ^4.1.16 => 4.1.21 
    gatsby-plugin-feed: ^2.3.23 => 2.3.26 
    gatsby-plugin-google-analytics: ^2.1.29 => 2.1.33 
    gatsby-plugin-google-tagmanager: ^2.1.18 => 2.1.24 
    gatsby-plugin-guess-js: ^1.1.26 => 1.1.29 
    gatsby-plugin-layout: ^1.1.16 => 1.1.21 
    gatsby-plugin-mailchimp: ^2.2.3 => 2.2.3 
    gatsby-plugin-manifest: ^2.2.31 => 2.2.37 
    gatsby-plugin-mdx: ^1.0.59 => 1.0.67 
    gatsby-plugin-netlify: ^2.1.28 => 2.1.31 
    gatsby-plugin-netlify-cache: ^0.1.0 => 0.1.0 
    gatsby-plugin-nprogress: ^2.1.15 => 2.1.18 
    gatsby-plugin-offline: ^3.0.27 => 3.0.31 
    gatsby-plugin-react-helmet: ^3.1.16 => 3.1.21 
    gatsby-plugin-sharp: ^2.3.5 => 2.3.13 
    gatsby-plugin-sitemap: ^2.2.22 => 2.2.25 
    gatsby-plugin-theme-ui: ^0.2.43 => 0.2.53 
    gatsby-plugin-twitter: ^2.1.15 => 2.1.18 
    gatsby-plugin-typography: ^2.3.18 => 2.3.21 
    gatsby-remark-autolink-headers: ^2.1.19 => 2.1.23 
    gatsby-remark-code-titles: ^1.1.0 => 1.1.0 
    gatsby-remark-copy-linked-files: ^2.1.31 => 2.1.36 
    gatsby-remark-embedder: ^1.11.0 => 1.7.0 
    gatsby-remark-graphviz: ^1.1.18 => 1.1.21 
    gatsby-remark-images: ^3.1.35 => 3.1.42 
    gatsby-remark-normalize-paths: ^1.0.0 => 1.0.0 
    gatsby-remark-prismjs: ^3.3.25 => 3.3.30 
    gatsby-remark-responsive-iframe: ^2.2.28 => 2.2.31 
    gatsby-remark-smartypants: ^2.1.17 => 2.1.20 
    gatsby-source-airtable: ^2.0.12 => 2.0.12 
    gatsby-source-filesystem: ^2.1.40 => 2.1.46 
    gatsby-source-git: ^1.0.2 => 1.0.2 
    gatsby-source-npm-package-search: ^2.1.19 => 2.1.22 
    gatsby-transformer-csv: ^2.1.19 => 2.1.24 
    gatsby-transformer-documentationjs: ^4.1.20 => 4.1.23 
    gatsby-transformer-remark: ^2.6.39 => 2.6.48 
    gatsby-transformer-screenshot: ^2.1.44 => 2.1.49 
    gatsby-transformer-sharp: ^2.3.7 => 2.3.12 
    gatsby-transformer-yaml: ^2.2.18 => 2.2.23 
  npmGlobalPackages:
    gatsby-cli: 2.8.26
github-actions[bot] commented 4 years ago

Hiya!

This issue has gone quiet. Spooky quiet. πŸ‘»

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open! As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! πŸ’ͺπŸ’œ

muescha commented 4 years ago

it would be good if the error message give a little bit more info about the source of the error

we can guess about the NPMPackage.type.ts but which field or which file / creator / stacktrace would be nice...

muescha commented 4 years ago

it would be helpful if the error message print also the property/field name

jzabala commented 4 years ago

Hi, I would like to take this one. I'll assign it to me πŸ™‚

it would be helpful if the error message print also the property/field name

@muescha after reading the code I realized the error says what the problematic property/field is: NPMPackage.types.ts, that types.ts is the field with the problem.

The problem is that the field ts from Algolia comes with the values specified in the error: sometimes the string 'included' others the boolean false. I haven't found much info about this field on the internet but it looks like the only two possible values are 'included' or false, so, we could change that 'included' to true unless someone knows about another possible string value different that 'included'. Or we could do the inverse and change false to some string like 'notIncluded'.

muescha commented 4 years ago

Thanks for explanation :)

πŸ€¦β€β™‚οΈand I was thinking this NPMPackage.types.ts was a automagically generated types typescript file

LekoArts commented 4 years ago

Since we moved the source for the website this isn't a concern for www anymore. However, the source plugin itself could get this improvement (and another fix). I opened a new issue for it, @jzabala if you want to tackle it let us know in the issue: https://github.com/gatsbyjs/gatsby/issues/26836