Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Support for MethodFieldResolver with only DataFetchingEnvironment.

Aperta
#304 2 commenti 2 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
graphql, java, kotlin
Ambito
api

Direzione di ricerca

Start by locating the MethodFieldResolver entry point and reading how it currently matches resolver method parameters, especially DataFetchingEnvironment. Done means methods shaped like method (is|get|getField)?<Name>(*fieldArgs, DataFetchingEnvironment) are supported, while existing resolver forms continue to work.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement help wanted
  1. method <name>(object, *fieldArgs [, DataFetchingEnvironment])
  2. method is<Name>(object, *fieldArgs [, DataFetchingEnvironment]), only if the field returns a Boolean
  3. method get<Name>(object, *fieldArgs [, DataFetchingEnvironment])
  4. method getField<Name>(object, *fieldArgs [, DataFetchingEnvironment])
  5. field <name>

Currently only the above fieldResolvers are supported.
But there are use cases where are in using local context would be the only requirement.
Can methods with the following definition be supported?

method (is|get|getField)?<Name>(*fieldArgs, DataFetchingEnvironment) is supported.

The following hypothetical example shows that while loading imageBlob, we would want to know just the type of files supported. Since the parent of imageBlob is the image this data won't be available. Just the localContext is needed. In these cases, there is only need for DataFetchingEnvironment. So support for the above mentioned methodResolver would be cleaner.

type Folder {
    supportedFileTypes: [String!]!
    images: [Image!]!
}
type Image {
    imageBlob: String
}
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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di graphql-java-kickstart/graphql-java-tools

Tutte le issue di graphql-java-kickstart/graphql-java-tools

Issue simili

Altre issue su Kotlin

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.