Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AggregationDataStore : RequestScope should include fields requested for a given entity load #823

Closed
aklish opened this issue May 21, 2019 · 1 comment
Assignees

Comments

@aklish
Copy link
Member

aklish commented May 21, 2019

The Aggregation Data Store needs to know what attributes and relationships are being fetched so that it can construct a complete JPQL query.

While this information is available today for JSON-API (via the request headers and the list of sparse fields for a given entity model), this capability does not exist for GraphQL.

Expected Behavior

A new field, requestedSubgraph will be set inside the requestScope each time loadObjects or getRelationship is called on the DataStoreTransaction.

This field will contains a nested map containing the entity relationship graph (entities, fields, and relationships to other entities) that is being requested starting at the current collection or entity that is being loaded.

Possible Solution

Both JSON-API and GraphQL will require changes:

  1. JSON-API can construct this graph from the &include and &fields query parameters.
  2. GraphQL can look at the SelectionSet passed in the DataFetchingEnvironment.

Context

#804

@QubitPi
Copy link
Contributor

QubitPi commented May 28, 2019

This issue is done by #896

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

No branches or pull requests

3 participants