Skip to content

Throw an exception if fields are empty or null#5

Open
ppettitau wants to merge 1 commit intoyouyo:masterfrom
ppettitau:throw_exception_for_empty_fields
Open

Throw an exception if fields are empty or null#5
ppettitau wants to merge 1 commit intoyouyo:masterfrom
ppettitau:throw_exception_for_empty_fields

Conversation

@ppettitau
Copy link

@ppettitau ppettitau commented Apr 22, 2022

Throw an exception if fields are empty or null to catch the issue early on, as this will not produce a valid GraphQL query.

Example (Before change)
GqlQuery().fields([]).query('hero').generate()
would produce an invalid GraphQL query: hero { }

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.

1 participant