SOFA icon indicating copy to clipboard operation
SOFA copied to clipboard

swaggerUI config for enabling sorting?

Open f1-outsourcing opened this issue 10 months ago • 2 comments

When clicking a bit through this ui I am getting this error. I was wondering if my 'default' setup needs to be changed for this.

  "message": "Variable \"$sort\" got invalid value [{}] at \"sort[0]\"; Field \"0\" is not defined by type \"UserSort\"."
type Query {
    databaseStatus: String
    actors: [Person]
}

schema {
    query: Query
}

type Person @node {
    name: String
    created: BigInt
}

type User @node {
    created: BigInt
    username: String
    enabled: Boolean
    password: String
    name: String
    apikey: String
}

f1-outsourcing avatar Feb 26 '25 23:02 f1-outsourcing

Is it possible to remove/hide this where stuff, only going to use name / id

{
  "name": "string",
  "name_EQ": "string",
  "name_IN": [
    "string"
  ],
  "name_CONTAINS": "string",
  "name_STARTS_WITH": "string",
  "name_ENDS_WITH": "string",
  "created": 0,
  "created_EQ": 0,
  "created_IN": [
    0
  ],
  "created_LT": 0,
  "created_LTE": 0,
  "created_GT": 0,
  "created_GTE": 0,
  "OR": [
    {}
  ],
  "AND": [
    {}
  ],
  "NOT": {}
}

f1-outsourcing avatar Feb 26 '25 23:02 f1-outsourcing

Please share an isolated minimal reproduction on CodeSandbox, like I asked the other issues/discussions you've created; https://github.com/Urigo/SOFA/discussions/1710#discussioncomment-12369799

ardatan avatar Mar 03 '25 02:03 ardatan