How to use distinct in GraphQL query?

后端 未结 2 1458
野趣味
野趣味 2021-01-17 19:32

Here is query where I try to use distinct in graphQl query:

query{
    contacts(take: 10, distinct: true) {
        firstName
        lastName
        title
         


        
2条回答
  •  情歌与酒
    2021-01-17 20:10

    GraphQL has no built-in sorting/filtering. It is up to the server to implement features like that, so if you're relying on a third party API and it doesn't support it then you will have to filter the response yourself.

提交回复
热议问题