graphql icon indicating copy to clipboard operation
graphql copied to clipboard

Sorting schema should not be generated for cypher fields with NonNullable arguments

Open mjfwebb opened this issue 4 months ago • 1 comments

Given the following type definitions, schema is generated for sorting on the field custom_string_with_param.

This should not occur as that field takes a NonNullable argument.

type Movie {
    custom_string_with_param(param: String!): String!
        @cypher(statement: "RETURN $param as c", columnName: "c")
}

Excerpt from the schema generated:

            \\"\\"\\"
            Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object.
            \\"\\"\\"
            input MovieSort {
              custom_string_with_param: SortDirection
            }

We should ensure that custom cypher fields with NonNullable arguments do not have sort schema generated.

mjfwebb avatar Oct 08 '24 10:10 mjfwebb