Sort Methods in Graphiql

Hi I am working on refactoring a project to use the new gatsby-source-prismic plugin and I am having an issue whenever I try to use sort or limit. It states it 'can't read property map of undefined'. However when I removed the filtering the query works and returns data with no problem.

Here it is without it:

Hey Maddy, I tested the argument and was able to reproduce this error. I've added it to the dev team's backlog. As soon as I have some news, I'll let you know.

Thanks

Hi @maddy,

I believe the issue here is that you've specified order here but not the filed to order it by, to quote the docs:

You use two parameters for this argument: field to specify the Prismic field ID and order to specify if you want it sorted ascending (ASC) or descending (DESC). You can use any metadata or a Prismic field.

You can read the full docs here:

Thanks.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.