How to call GraphQL API through Realm framework?

Hello,

How to call GraphQL API through MongoDB realm framework??

If Apollo Client framework is the solution then How can we manage pagination(limit and offset).

Thanks in advance.

1 Like

@Vishal_Deshai Yes I would use the Apollo client to connect to the GraphQL API. You can send the limit operator in a GraphQL query just as you normally would - https://www.apollographql.com/docs/ios/

query {
  movies(
    query: { year: 2000 }
    sortBy: RUNTIME_DESC
    limit: 10
  ) {
    _id
    title
    year
    runtime
  }
}

Hello,

Thanks for the answer.

first 10 records are fetch then next time we need 11 to 20 records(Next 10).

Thanks

Hi

Waiting for your positive feedback.

Let me repeat my query. How can we get next 10 records(i.e. 11 to 20) if page size is 10.

Thanks.

Hi Vishal,

You will have to use find() and limit() to implement this with custom resolvers.

Any chance this could be a feature? Doing a custom resolver doesn’t make the use as dynamic and you need keep track of more and more functions.

updateMany etc are features for example. Count, Skip and Next are features at AWS and Dgraph.