Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(gatsby): better text for missing inferred extension #28530

Merged
merged 5 commits into from
Dec 8, 2020

Conversation

vladar
Copy link
Contributor

@vladar vladar commented Dec 8, 2020

Description

This PR addresses a deprecation warning displayed when the type definition is missing inferred extension. Currently, the warning text is a bit confusing:

Deprecation warning - adding inferred resolver for field Test.date.
In Gatsby v3, only fields with an explicit directive/extension will get a resolver.

After this PR the warning text will be this:

Deprecation warning: adding inferred extension `dateformat` for field `Test.date`.
In Gatsby v3, only fields with an explicit directive/extension will be resolved correctly.
Add the following type definition to fix this:

  type Test implements Node {
    date: Date @dateformat
  }

https://www.gatsbyjs.com/docs/actions/#createTypes

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Dec 8, 2020
@vladar vladar added topic: GraphQL Related to Gatsby's GraphQL layer and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Dec 8, 2020
pvdz
pvdz previously approved these changes Dec 8, 2020
Copy link
Contributor

@pvdz pvdz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💜

Copy link
Contributor

@pieh pieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@vladar vladar added the bot: merge on green Gatsbot will merge these PRs automatically when all tests passes label Dec 8, 2020
@gatsbybot gatsbybot merged commit 298110c into master Dec 8, 2020
@delete-merged-branch delete-merged-branch bot deleted the vladar/fix-inference-warning branch December 8, 2020 13:24
pieh pushed a commit that referenced this pull request Dec 8, 2020
* fix(gatsby): better text for missing extension

* add SDL example on how to fix the problem

* fix typo

* Add a link to createTypes docs

* formatting

(cherry picked from commit 298110c)
pieh pushed a commit that referenced this pull request Dec 9, 2020
)

* fix(gatsby): better text for missing extension

* add SDL example on how to fix the problem

* fix typo

* Add a link to createTypes docs

* formatting

(cherry picked from commit 298110c)

Co-authored-by: Vladimir Razuvaev <vladimir.razuvaev@gmail.com>
@pieh
Copy link
Contributor

pieh commented Dec 10, 2020

Published in gatsby@2.28.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: merge on green Gatsbot will merge these PRs automatically when all tests passes topic: GraphQL Related to Gatsby's GraphQL layer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants