Skip to content
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

Allow searching through Relationships in Graphql List Query #331

Open
2 tasks
ilyaskarim opened this issue Jan 25, 2022 · 0 comments
Open
2 tasks

Allow searching through Relationships in Graphql List Query #331

ilyaskarim opened this issue Jan 25, 2022 · 0 comments
Assignees

Comments

@ilyaskarim
Copy link
Collaborator

ilyaskarim commented Jan 25, 2022

If a module Post has one to one relationship with Category, in GraphQL Wertik JS should allow searching posts with category as well for example:

query ListPosts {
  listPost(where: { id: { _eq: 1 }, category: { name: { _eq: "Tech" } } }) {
    list {
      id
      category {
        name
      }
    }
  }
}

Todo:

  • Take out relationship items from the module and add them to schema
  • In resolver for the list resolver, go through each property from where and check if it is a module and then add the search and it should be a recursive function to filter in depth.
@ilyaskarim ilyaskarim changed the title Allow searching through Relationships Allow searching through Relationships in Graphql List Query Jan 25, 2022
@ilyaskarim ilyaskarim self-assigned this Jan 25, 2022
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