Skip to content

Documentation Request: Custom queries not related to drupal json api #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jalite1991 opened this issue Apr 15, 2020 · 0 comments
Closed

Comments

@jalite1991
Copy link

Can you please provide an example of how to write a query that isn't using the @fromJsonApi annotation. We see we can override typeDefs through the resolverMap, but when we create a custom query like...

type Query {
  colony_menu(id: String!): Menu
}

when we add custom resolvers we get the error 0|contenta | Error: colony_menu defined in resolvers, but not in schema

we tried two type of resolvers with

  colony_menu: ({id}, args, context, info) => {

      return { id: id, links: ["/", "/about"]};
  }
  Query: {
    colony_menu: ({id}, args, context, info) => {

      return { id: id, links: ["/", "/about"]};
    }
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant