99designs / 99designs/gqlgen

FIELD_DEFINITION directive return nil obj

Aperta
#2,762 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Go
Stelle
10.8k
Fork
1.3k
Merge medio
2g 36m
PR unite (30g)
26

Descrizione

### What happened?

- FIELD_DEFINITION directive return nil obj

### What did you expect?

- return arguments

```graphql
directive @hello(reason: String = "No longer supported") on FIELD_DEFINITION

extend type Query {
test(hello: String!, world: String!): String! @hello
}
```

```go
config := gqlgen.Config{
Resolvers: &Resolver{service},
}
config.Directives.Hello = func(ctx context.Context, obj interface{}, next graphql.Resolver, reason *string) (res interface{}, err error) {
fmt.Printf("Obj %+v\n", obj)
return next(ctx)
}
```

output: nil

### versions
- `go run github.com/99designs/gqlgen version`: v0.17.36
- `go version`: v1.20.6

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.