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
2 years ago
go.mod
2 years ago
go.sum
2 years ago
gqlgen.yml
2 years ago
generated.go
2 years ago
models_gen.go
2 years ago
resolver.go
2 years ago
schema.graphqls
2 years ago
schema.resolvers.go
2 years ago
str.go
2 years ago
server.go
2 years ago
tools.go
2 years ago