Reject directives applied at the wrong location, without a required argument or twice in 15.0.0
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 72/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- backend-api-design, release, testing
Direzione di ricerca
Start with SchemaParser#directiveProblems and SchemaParser#directivesOf, then read DirectiveTest.should warn about invalid applied directives and keep them. Replace the warnings with SchemaError using the same messages, and cover the type extension case for duplicate non-repeatable directives. Update the 15.0.0 release notes; done when invalid applications fail with the expected errors and the test and release notes describe the change.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Since #225, tools logs a warning when a schema applies a directive in a way its definition doesn't allow, and still builds the schema:
directive @uppercase on OBJECT
directive @auth(role: String!) on FIELD_DEFINITION
directive @cached(ttl: Int) on FIELD_DEFINITION
type Query {
motto: String @uppercase
secret: String @auth
members: [Member!] @cached @cached(ttl: 10)
}
Directive @uppercase is applied to field 'Query.motto', but it's declared on OBJECT, not FIELD_DEFINITION.
Directive @auth is applied to field 'Query.secret' without its required argument 'role'.
Directive @cached isn't repeatable but is applied more than once to field 'Query.members'.
graphql-java's SchemaGenerator rejects all three, and the spec doesn't allow them either. But they always built with tools, so failing on them has to wait for a major release.
What to change
- replace the warnings from
SchemaParser#directiveProblemswith aSchemaErrorthat has the same messages - probably do the same for the warning in
SchemaParser#directivesOf, when a type extension applies a non-repeatable directive the type already has. It's the same mistake, it just drops the repeat today - turn
DirectiveTest.should warn about invalid applied directives and keep theminto a test for the error - mention it in the 15.0.0 release notes
- Lingua principale
- Kotlin
- Stelle
- 824
- Fork
- 175
- Merge medio
- 2g 5h
- PR unite (30g)
- 52
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di graphql-java-kickstart/graphql-java-tools
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
graphql-java-kickstart/graphql-java-tools#893 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
graphql-java-kickstart/graphql-java-tools#889 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
graphql-java-kickstart/graphql-java-tools#886 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
graphql-java-kickstart/graphql-java-tools#881 ·
I maintainer di solito rispondono entro 1 giorno
-
Directive wirings see a type reference on recursive input fieldsForse già presa @oryan-block l’ha presa oggi. Apertabug
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
graphql-java-kickstart/graphql-java-tools#875 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di graphql-java-kickstart/graphql-java-tools
Issue simili
-
area/kotlin
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
dafonton77-tech/Cadreenf#11 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
Hy4ri/hermes-mobile#1647 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
rawnaldclark/Stash#649 ·
I maintainer di solito rispondono entro 1 giorno