Skip to content

Fix TypeDefinition#fields for types without fields (e.g. union)#9

Merged
dylanahsmith merged 1 commit intomasterfrom
nil-fields
Feb 9, 2017
Merged

Fix TypeDefinition#fields for types without fields (e.g. union)#9
dylanahsmith merged 1 commit intomasterfrom
nil-fields

Conversation

@dylanahsmith
Copy link
Copy Markdown
Contributor

Problem

I noticed from Shopify/graphql_java_gen#9 that calling fields on a union type was resulting in an error in graphql_schema. I think it should just return nil like it is in the schema.

Solution

Add an early return for the case where the fields array is nil in the schema.

@dylanahsmith dylanahsmith merged commit f422336 into master Feb 9, 2017
@dylanahsmith dylanahsmith deleted the nil-fields branch February 9, 2017 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants