-
Notifications
You must be signed in to change notification settings - Fork 68
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
Add schema definition breakdown feature #123
Comments
Hey. Thx for the interesting topic, we do have schema usage in PD ourselves too (though its not so nested).
|
Hello!
It is going to be similar to other solutions on the market, I can share tomorrow some prototyping.
That is the plan, the idea is to have control about what are the fields inside each operation , this should not be an issue, on the other hand we plan to store the usage of those fields on the operations but it is not going to be stored forever, the idea is to have records from the last 30 days otherwise can be a decrease in the performance |
Hello 👋
We decided to add this columns in the fields table, because we are planning to be able to represent data like the following -> [String ! ] !. So for this example, it will be is_array=true, is_nullable=false and is_array_nullable=false
For this example, we will need to store the query on the |
Thats not going to scale. Here at pipedrive, we serve >8k requests per minute. |
I would suggest to consider this kind of architecture:
|
Hello :) We discussed internally about your suggestion and right now we are going to focus on the breakdown queries when receiving a Thanks for the patience |
do you mean when someone pushes the schema, you want to parse type_defs and save it into relational form? I guess that may help to build UI where you can focus on specific entity or property (like apollo studio does). The possible problem there is that it may be inconsistent with actual type_defs that are stored as text. So I assume text form will remain source of truth. |
Exactly as you said. We will store everything on the database tables, to be able to display the model similar to apollo studio does. And yes, the text form will be the source of truth. |
Hello @tot-ra , as mentioned before, we are going to start working on the break down feature, before planning the schema usage feature. We would like to know your opinion when a schema is being updated (new type, modifying a field, removing a query...), if we encounter a breaking change, as we don't know if the change is being used by anyone, we are planning to add a header on the As soon as the usage feature is working, we will change this behaviour, and will be only valid to update an schema in case the breaking change is not being used. |
closing this, lets continue in #146 |
Hello @tot-ra 👋
We are planning to add some features mentioned in the roadmap, starting by adding a schema usage breakdown (Query, Mutations, Scalars, Objects...).
The aim is to store all the schema definitions to be able to display them and also allow next steps such as usage tracking.
Backend changes
We would like to create some new MySQL tables with the distribution showed below:
Having this, we could parse the
type_defs
received in theschema/push
endpoint to the new tables. Furthermore we will add new graphQL queries for the frontend to consume this data.Frontend changes
Consume the backend new graphQL queries to present all the schema definitions adding new pages.
Thank you for your time, and nice work! 😃
The text was updated successfully, but these errors were encountered: