birkir / gatsby-source-prismic-graphql

Gatsby source plugin for Prismic GraphQL
MIT License
137 stars 75 forks source link

More advanced filtering in query arguments #92

Open michaeljblum opened 4 years ago

michaeljblum commented 4 years ago

I'm coming to gatsby-source-prismic-graphql because I was having trouble setting up v3 of gatsby-source-prismic, and I really would like to have the ability to easily set up previews.

One thing I'm having trouble with in gatsby-source-prismic-graphql are more flexible filtering arguments in queries.

For example, in gatsby-source-prismic, I could query the following:

...
allPrismicProject(
      filter: {
        data: {
          grouped_links: {
            elemMatch: { single_link: { uid: { in: $uids } } }
          }
        }
      }
    ) {
      edges....

This would allow me to find all projects that share the same or similar linked pages ($uids is [String]).

Is there anyway to accomplish something like this in gatsby-source-prismic-graphql?

Duaner commented 4 years ago

Hey, @michaeljblum this is not possible in the current prismic GraphQL API this is something that is planned though.