The current documentation specifies that the
@index directive is added at the end of a Query function in the GraphQL schema. However, I can only use the
@index directive if I get rid of the
@resolver directive. I am confused by this as I used the
@resolver directive to indicate to GraphQL that my UDF was paginated. The goal is to get all my documents back and paginate them. An index to get all the documents back is what I need in this use case, however, I thought I also needed a UDF that incorporated pagination. Is the
@index directive supposed to replace the need for a UDF here and just be defined within Query block? If that’s the case, its confusing to build an index for a Query function if it doesn’t actually point back to a Query function. Am I missing something here? Or does GraphQL know behind the hood that the
@index directive also points to a resolver? If so, how would I go about pagination in this case?
It seems like the only solution I know is to define the index separately and use
@resolver(paginated: true) in my schema. But this feels like it shouldn’t be the case and I should just be able to define the
@resolver directive on the same line.