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
typeProgram {
id: ID!slug: String # this is unique # ... other fields
}
I want to create a partial resolver for a query program(slug: String!): Program. How do I do it without knowing the id of the Program type?
Is something like this possible?
// ...resolvers: {Query: {program: (parent,args: unknown,c)=>{constvars=argsasProgramQueryVariables;console.log(vars);// scroll thru all `Program` fields, find the one with the proper slug...?console.log(c.inspectFields({__typename: "Program"}));},},},// ...
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 have an entity
Program
:I want to create a partial resolver for a query
program(slug: String!): Program
. How do I do it without knowing theid
of theProgram
type?Is something like this possible?
Beta Was this translation helpful? Give feedback.
All reactions