-
Notifications
You must be signed in to change notification settings - Fork 231
[2022-08-04] Redefine the problem that "struct" is solving #1100
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
Comments
Related to the Metadata discussion on 9/1 - may expand on this in the future |
Update from last night's WG: we still need to collect more use cases, but "structured leaves" is definitely a problem that needs solving one way or another. |
As agreed at the October 2023 WG; action items that have been inactive for more than 6 months can be closed. |
I still feel that |
Another example of someone having a problem that fits well into what struct offers: graphql/graphql-spec#929 (comment) |
Hi @benjie , |
Please share more details of your use case; the issue at the WG was that strict solved too many problems and may not have been the best solution for any of them, so we need to have some concrete full use cases that we can then find solutions for, which may include struct as an option. Maybe you could start by explaining how JSON scalar is insufficient for your needs? |
I cannot share company internal information, but I can map and simplify it to something else. I hope it helps: type Thing {
name: String!
}
type SpecialThing implement Thing {
name: String!
additionalValue: String!
}
type RecursionIssueThing implements Thing {
name: String!
things: [Thing]
}
type Agent {
id: String!
things: [Thing]
}
type AgentMetaData {
id: String!
}
type Query {
agents: [AgentMetaData]
agent(id: String!): Agent
} The issue is our Our Agent can have query {
agent(id: "1") {
id
things
}
} Defining the complete structure is already for one level kind of difficult. So your struct concept sounded great, because we could handle Instead, at the moment we defined a scalar Any, which serializes the information from above to a string. So we loose the type safetly. It is more like a hidden secret now, how the Edit: We also generate the queries and response types, which typically remove the need to write the models by hand. |
🎥 Timestamped YouTube link
Note: Action Item issues are reviewed and closed during Working Group
meetings.
The text was updated successfully, but these errors were encountered: