How to handle resolving a null field with @http? #2466
-
With this example: schema @server(port: 8000) @upstream(baseURL: "http://jsonplaceholder.typicode.com") {
query: Query
}
type Query {
users: [User] @http(path: "/users")
}
type User {
id: Int!
name: String!
username: String!
email: String!
authorID: String
posts: [Post]
@http(
path: "/posts"
query: [{ key: "author_ids[]", value: "{{.value.authorID}}" }]
batchKey: ["author_ids[]"]
)
}
type Post {
id: Int!
title: String!
body: String!
} If Ideally, something that could allow to skip the resolver if the value is null |
Beta Was this translation helpful? Give feedback.
Answered by
amitksingh1490
Jul 19, 2024
Replies: 1 comment 1 reply
-
Created an issue for this #2467, Please have a look |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
angristan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Created an issue for this #2467, Please have a look