You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently got into problem, where I cannot structure queries and mutations, so they are convenient to consume by FE in explorer as Altair and they are not grouped on the schema level. I red all proposals we have regarding namespaces and would like to throw my 5 cents here.
What if instead of grouping resolvers by type, group them by structure (logic/business) and prefix them with query and mutation?
type Book {
id: Number
title: String
getAll: Book[]!
}
type Account {
id: Number
name: String
mutation update(data: AccData!): Boolean
query getAll(filter: filterObject!): Account[]!
books: Book
}
And then we can fetch with
query Account.getAll {
Account {
id
name
}
}
or
query Account.books.getAll {}
In explorer I'd like to see some hierarchical structure like this, so working with one business domain is easy for FE team
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi!
I recently got into problem, where I cannot structure queries and mutations, so they are convenient to consume by FE in explorer as Altair and they are not grouped on the schema level. I red all proposals we have regarding namespaces and would like to throw my 5 cents here.
What if instead of grouping resolvers by type, group them by structure (logic/business) and prefix them with
query
andmutation
?And then we can fetch with
or
In explorer I'd like to see some hierarchical structure like this, so working with one business domain is easy for FE team
Overall root level going to represent domains in a list, rather than just types of queries which is obvious they are there
It can be an addition to what we already have, no need to remove existing SDL rules.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions