compiler.relay must NOT have additional properties
See original GitHub issueVerify canary release
- I verified that the issue exists in the latest Next.js canary release
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000
Binaries:
Node: 16.15.0
npm: 8.5.5
Yarn: 3.2.0
pnpm: N/A
Relevant packages:
next: 12.2.4-canary.0
eslint-config-next: 12.1.6
react: 0.0.0-experimental-c1f5884ff-20220705
react-dom: 0.0.0-experimental-c1f5884ff-20220705
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
This bug happens in the last canary, a week ago it was ok. The compiler works, that means that the values passed are properly arriving to the compiler, but we have a bunch of disturbing warning messages.
This config for a relay project warns:
module.exports = {
// ..
compiler: {
relay: {
// THIS 3 ARE OK
src: 'scenes',
schema: 'schema/server.graphql',
language: 'flow',
// ANYTHING ELSE WARNS
customScalars: {
DateTime: 'string',
Upload: 'File',
},
}
}
warn - Invalid next.config.js options detected:
[
{
"instancePath": "/compiler/relay",
"schemaPath": "#/properties/compiler/properties/relay/additionalProperties",
"keyword": "additionalProperties",
"params": {
"additionalProperty": "schema"
},
"message": "must NOT have additional properties"
},
{
"instancePath": "/compiler/relay",
"schemaPath": "#/properties/compiler/properties/relay/additionalProperties",
"keyword": "additionalProperties",
"params": {
"additionalProperty": "schemaExtensions"
},
"message": "must NOT have additional properties"
},
{
"instancePath": "/compiler/relay",
"schemaPath": "#/properties/compiler/properties/relay/additionalProperties",
"keyword": "additionalProperties",
"params": {
"additionalProperty": "customScalars"
},
"message": "must NOT have additional properties"
},
{
"instancePath": "/compiler/relay",
"schemaPath": "#/properties/compiler/properties/relay/additionalProperties",
"keyword": "additionalProperties",
"params": {
"additionalProperty": "noFutureProofEnums"
},
"message": "must NOT have additional properties"
}
]
Expected Behavior
Must not be warnings for needed parameters in compiler.relay
.
Link to reproduction
https://stackblitz.com/edit/vercel-next-js-gjket8?file=next.config.js
To Reproduce
Start on dev and see the warnings in the console.
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:15 (4 by maintainers)
Top Results From Across the Web
Error: Schema validation failed with the following errors: Data ...
Schema validation failed with the following errors: Data path "['server']" should NOT have additional properties(scripts).
Read more >Introducing the new Relay compiler
We've further improved the performance of the compiler since then. This post will explore why Relay has a compiler, what we hope to...
Read more >Limitations & Troubleshooting | Android Developers
If a UI Package name does not start with a letter, Relay will generate Compose code that does not compile, with an error...
Read more >Relay Compiler - Relay Docs
The Relay Compiler is responsible for generating code as part of a build step which, at runtime, can be used statically. By building...
Read more >A deep-dive into Relay, the friendly & opinionated GraphQL ...
Go with a less opinionated, more flexible GraphQL client like Apollo. Anatomy of Relay. Colocation. Fragments; Data masking. Relay compiler.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@MonstraG the i18n one appears to be valid warnings as you are adding invalid config, this should be fixed in
next-i18next
itself.Same type of warning, no problem with next@12.2.2: