Skip to content

Commit

Permalink
fix(gatsby): make ___NODE convention less noisy (#37781)
Browse files Browse the repository at this point in the history
* make ___NODE convention less noisy

* log once per plugin
  • Loading branch information
TylerBarnes committed Mar 31, 2023
1 parent da5c1a1 commit 9536f64
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/gatsby/src/schema/infer/add-inferred-fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const addInferredFields = ({
typeComposer,
exampleValue,
typeMapping,
parentSpan,
}) => {
const config = getInferenceConfig({
typeComposer,
Expand All @@ -35,10 +34,10 @@ const addInferredFields = ({
})

if (deprecatedNodeKeys.size > 0) {
const plugin = typeComposer.getExtension(`plugin`)

reportOnce(
`The ___NODE convention is deprecated. Please use the @link directive instead.\nType: ${typeComposer.getTypeName()}, Keys: ${Array.from(
deprecatedNodeKeys
).join(`, `)}\nMigration: https://gatsby.dev/node-convention-deprecation`,
`Plugin "${plugin}" is using the ___NODE convention which is deprecated. This plugin should use the @link directive instead.\nMigration: https://gatsby.dev/node-convention-deprecation`,
`verbose`
)
}
Expand Down

0 comments on commit 9536f64

Please sign in to comment.