Clone with
git clone git://git.awl.red/neallred/gql-interfaces-snippet
gql-interfaces-snippet📎
Brief example showing how to use interfaces and fetch lists of data with multiple types
- Run server with
go run server.go
- Open a browser tab to http://localhost:8080
- Query the following snippet:
{
inventory {
SN
MAC
... on HardDrive {
Name
Capacity
}
... on ComputeNode {
Name
}
}
}
README.md
1 year ago
go.mod
1 year ago
go.sum
1 year ago
gqlgen.yml
1 year ago
generated.go
1 year ago
models_gen.go
1 year ago
resolver.go
1 year ago
schema.graphqls
1 year ago
schema.resolvers.go
1 year ago
str.go
1 year ago
server.go
1 year ago
tools.go
1 year ago