graph-gophers / graphql-go

GraphQL server with a focus on ease of use
BSD 2-Clause "Simplified" License
4.64k stars 491 forks source link

fix: Nullable arguments in directives #615

Closed EverWinter23 closed 1 year ago

EverWinter23 commented 1 year ago

A query with nullable directives would panic because the library would try to deserialize a null value.

This fix adds a null check while iterating thought the directives and skips arguments which have not been supplied.

Closes https://github.com/graph-gophers/graphql-go/issues/611