graphql-client icon indicating copy to clipboard operation
graphql-client copied to clipboard

Unable to use the ObjectType accessors with fragments

Open Samsinite opened this issue 4 years ago • 1 comments

Hello, First wanted to say thank you for building this library, it is very useful.

I've been encountering a bug when using fragments where the ObjectType class is returning a GraphQL::Client::ImplicitlyFetchedFieldError for fields that are included via a fragment (at least when a mutation query is performed). For those looking for a workaround,to_h still works and allows me to access those fields included via a fragment.

Wanted to report this for now, if I have some time, I'll try to look into this bug and creating a failing test case in more detail. If a unreleased commit has already address this issue, please let me know.

Samsinite avatar Oct 11 '21 19:10 Samsinite

I'm experiencing this issue with a non mutation query too.

ObjColumnist avatar Nov 02 '21 21:11 ObjColumnist