-
Notifications
You must be signed in to change notification settings - Fork 101
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
hive as a persisted operations/documents store #659
Comments
It could also show a complexity score next to each document. |
Could also reject documents with complexity higher than X |
S3 could be used as a schema registry |
Yes and Hive should control it all |
a few analytic stuff we can do here as well. e.g. display how many bytes saved from client <-> server requests by using persisted operations over time |
Plus some part of data processing (related to the usage reporting pipeline) might be done ahead of time and the structure of the usage report could be much different much much lower in size (and more performant on the user side - no processing of documents involved) |
Having GraphQL Hive act as a persistent operation store would be great.
Critical user flow
@graphql-hive/envelope
@graphql-hive/yoga
@graphql-hive/apollo
Technical Challenges
API: We need an async task runner for writing operations from “storage” to “CDN” and also cleaning them up if app deployment got retired (we cannot send 1000 requests to S3 from within a single HTTP call, can't we? :))- We decided that it makes most sense to immediately write to S3 in the incoming request; we can check whether deployment is active via another S3 key lookupNice to have (stretch goals; follow up tasks)
-->
Allow users to decide whether to do breaking change detection based on app deployments or usage data.
Delete persisted operation deployment flow
We must figure out how to incorporate the persisted operation schema coordinates within the hive check/breaking change detection flow (usage data). As long as a persisted operation deployment is active, the field is in usage, even if there is no data in the retention period. After a persisted operation deployment has been deleted/marked as retired/inactive, the deployment schema coordinates removal is no longer blocked by the deployment.
Based on the usage data, we can notify users when a client version seems unused (e.g. old mobile client).
Documentation
Details
Some ideas on how to store stuff...
S3 Key Structure
Here we write the graphql documents as long as the deployment is active - we need to ensure that it is removed from S3 if the deployment gets inactive. Thus a transactional background job seems inevitable.
SQL
When a deployment has been created and "frozen", we could generate the schema coordinate ---> hash mapping, for quick lookups of which a schema coordinate impacts operations. 🤔
Alternatively, we can execute the SQL live for each active deployment.
Unsure whether we should store all the schema coordinates used within a document alongside the document. 🤔
PROs:
Cons:
Links:
The text was updated successfully, but these errors were encountered: