gqlgen Resolver func missing OrderBy args in generated code

145 views Asked by At

I am new to go. I am building a project using gqlgen and ent. I have schema.graphql defined as below

type IP implements Node {
  id: ID!
  created_at: Time!
  updated_at: Time!
  response_code: String!
  ip_address: String!
  queries(after: Cursor, first: Int, before: Cursor, last: Int, orderBy: AppQueryOrder): AppQueryConnection
}

input AppQueryOrder {
  direction: OrderDirection!
  field: AppQueryOrderField
}

enum AppQueryOrderField {
  UPDATED_AT
  CREATED_AT
}

type AppQueryConnection {
  totalCount: Int!
  pageInfo: PageInfo!
  edges: [AppQueryEdge]
}

type AppQueryEdge {
  node: AppQuery
  cursor: Cursor!
}

type AppQuery implements Node {
  id: ID!
  created_at: Time!
  updated_at: Time!
  ip: IP!
  responses(after: Cursor, first: Int, before: Cursor, last: Int): AppResponseConnection
}

type AppResponseConnection {
  totalCount: Int!
  pageInfo: PageInfo!
  edges: [AppResponseEdge]
}

type AppResponseEdge {
  node: AppResponse
  cursor: Cursor!
}

type AppResponse implements Node {
  id: ID!
  created_at: Time!
  updated_at: Time!
  query: AppQuery!
  code: String!
  description: String!
}

After successful code generation I see that the Function for AppQueryResolver.Response and IP.queries are missing arguments for after: Cursor, first: Int, before: Cursor, last: Int ... in generated code. I have reviewed the schema based on example projects but unable see what could be causing this issue. There are no errors during code generation as well. Any pointers on where to further look to resolve this issue

go version 1.17 
entgo.io/contrib v0.2.0 
entgo.io/ent v0.9.2
github.com/99designs/gqlgen v0.14.0
0

There are 0 answers