我是新来的。我正在使用 gqlgen 和 ent 构建一个项目。我有 schema.graphql 定义如下
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!
}
成功生成代码后,我看到 AppQueryResolver.Response 和 IP.queries 的函数在生成的代码中缺少after: Cursor, first: Int, before: Cursor, last: Int ...的参数。我已经根据示例项目审查了架构,但看不到可能导致此问题的原因。在代码生成过程中也没有错误。有关在何处进一步寻找解决此问题的任何指示
go version 1.17
entgo.io/contrib v0.2.0
entgo.io/ent v0.9.2
github.com/99designs/gqlgen v0.14.0