Skip to content

Conversation

@benjie
Copy link
Member

@benjie benjie commented Feb 5, 2021

Description

Under a GraphQL Connection you may want to add different queries that share the same conditions but somehow differ (for example aggregates). The previous implementation only allowed one aggregate query which prevented adding GROUP BY or similar clauses to the query structure.

Performance impact

Negligible impact in itself, but plugins that leverage it could incur significant performance costs due to adding entirely new subqueries.

Security impact

Great care must be taken over the naming of the queries to prevent clashing with builtins. Using safeAlias will generally work so long as you can guarantee it's keyed off of something unique (such as the field alias in GraphQL).

@benjie benjie marked this pull request as ready for review February 10, 2021 17:13
@benjie benjie merged commit 352dab3 into v4 Feb 10, 2021
@benjie benjie deleted the named-connection-queries branch February 10, 2021 17:14
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.

2 participants