How to new field to specific connection nodes #2884
Unanswered
PeterSchuhmannNetflow
asked this question in
General
Replies: 1 comment
-
In GraphQL, types and schemas are supposed to be static, meaning their shape should not change conditionally, so it makes sense you're running into trouble. Instead, you can
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone and thank you for your great work with wp-graphql. Everything is well documented and works like a charme. But I found one case where I got a little confused or couldn't figure out a solution.
Problem: I would like to register custom fields to a Post that are only available for a specific query. Lets say you have a query like this:
nodes contains the regular Post object and all fields related to it. I would like to add more fields to
nodes
that are only available when usingpostsSearch
like this:these new fields should not be available when using a regular post query.
I am not sure where i went wrong maybe you guys could help.
Beta Was this translation helpful? Give feedback.
All reactions