refactor: move graphql into individual services

This commit is contained in:
Jon Lundy
2022-08-19 12:26:42 -06:00
parent d06e0bac3e
commit 814c974e93
20 changed files with 633 additions and 503 deletions

36
pkg/gql/common.graphqls Normal file
View File

@@ -0,0 +1,36 @@
scalar Time
scalar Map
type Connection @goModel(model: "github.com/sour-is/ev/pkg/gql.Connection") {
paging: PageInfo!
edges: [Edge!]!
}
input PageInput @goModel(model: "github.com/sour-is/ev/pkg/gql.PageInput") {
idx: Int = 0
count: Int = 30
}
type PageInfo @goModel(model: "github.com/sour-is/ev/pkg/gql.PageInfo") {
next: Boolean!
prev: Boolean!
begin: Int!
end: Int!
}
interface Edge @goModel(model: "github.com/sour-is/ev/pkg/gql.Edge"){
id: ID!
}
directive @goModel(
model: String
models: [String!]
) on OBJECT | INPUT_OBJECT | SCALAR | ENUM | INTERFACE | UNION
directive @goField(
forceResolver: Boolean
name: String
) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION
directive @goTag(
key: String!
value: String
) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION