3 ms·
I would say this is what your resolvers are for. Also, how would this effect the schema? Description would be a string, but where do we define title and date?
by adamredwoods 6y ago
I would say this is what your resolvers are for.
Also, how would this effect the schema? Description would be a string, but where do we define title and date? Must they be within the same data source? What if they're not?
I think Graphql wants to be as simple as possible.
- leoloso 6y agoYep, `title` and `date` are also fields on the same type `Post`. You could do this too: ``` query { posts { desc: echo(value: "{{ title }} with {{ date }}") title date } } ``` If those fields are not there, then it will give an error. I added a section about this on my proposal, under section "Further research": https://leoloso.com/posts/proposal-for-embeddable-fields-in-graphql-query/#heading-behavior-when-field-is-not-found https://leoloso.com/posts/proposal-for-embeddable-fields-in-...