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
Is your feature request related to a problem? Please describe.
Let's say we have the following graphql schema (example taken from @thisarattr's question related to this issue):
typeQuery {
book(id: ID): Book
}
typeBook {
name: String!author: Author
}
typeAuthor {
name: String!age: Int
}
The author should be resolved by a separate request, so I'm adding the following:
fieldsWithResolvers =setOf(
"Book.author",
)
And get a Book model like:
data classBook(
valname:String,
)
However, my database stores the author id directly in the book:
So for me it looks more natural to pass id through Book for Author resolving than through GraphQLContext. And, as I understand it, for the author of this comment too.
Describe the solution you'd like
Thus would like to have a model like:
data classBook(
valname:String,
valauthorId:String?,
)
Maybe it could be the addFieldIdForResolving option.
Describe alternatives you've considered
Or maybe it's better to be able to just set any custom fields (for example, option customFields with mapOf("Book.authorId" to "String") value).
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Let's say we have the following graphql schema (example taken from @thisarattr's question related to this issue):
The author should be resolved by a separate request, so I'm adding the following:
And get a
Book
model like:However, my database stores the author id directly in the book:
So for me it looks more natural to pass id through
Book
forAuthor
resolving than throughGraphQLContext
. And, as I understand it, for the author of this comment too.Describe the solution you'd like
Thus would like to have a model like:
Maybe it could be the
addFieldIdForResolving
option.Describe alternatives you've considered
Or maybe it's better to be able to just set any custom fields (for example, option
customFields
withmapOf("Book.authorId" to "String")
value).The text was updated successfully, but these errors were encountered: