graphql
graphql copied to clipboard
An implementation of GraphQL for Go / Golang
Hi guys, I have a follow mutation structure: ```go var userType = graphql.NewObject(graphql.ObjectConfig{ Name: "User", Fields: graphql.Fields{ "id": &graphql.Field{Type: graphql.String}, "name": &graphql.Field{Type: graphql.String}, "gender": &graphql.Field{Type: graphql.String}, }, }) func mutation()...
The following example uses the schema below ```gql type Query { product: Product } type Product { obj: Nested } type Nested { field: String! } ``` ```go package main...
Stop using `panic`/`recover` to throw errors. Instead, stick to Go's style for handling error. Function reports errors by returning an Go's `error` value (instead of passing with `panic`). Errors are...
we can return our custom error which imply interface `gqlerrors.ExtendedError` instead of new a `gqlerrors.Error`. And remove unnecessary `gqlerrors.FormattedError` embed.
Find below example , the query "namespaceList" is not picking, it shows "Cannot query field \"namespaceList\" on type \"Query\"." error . var Query = graphql.NewObject( graphql.ObjectConfig{ Name: "Query", Fields: graphql.Fields{...
> The `ID` scalar type represents a unique identifier, often used to > refetch an object or as key for a cache. The ID type appears in a JSON >...
Golang methods shouldn't return zero value structs on error. So, we should return `*Schema` on the `NewSchema` method. Why: https://groups.google.com/d/msg/golang-nuts/4yBldwsjZwo/sFcz1KVhU3wJ
This just an example to run an Express GraphQL client which uses the proxy to call the go Graphql server. Just an easy hack to show a beautiful user interface.
Hello, Is there a plan for a code generator based on this library? Thank you.