Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kevinmichaelchen/go-gqlgen-deferred-execution-example


https://github.com/kevinmichaelchen/go-gqlgen-deferred-execution-example

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# go-gqlgen-deferred-execution-example

This is a Go example of using the [GQLGEN](https://gqlgen.com/) GraphQL server
library.

It's an extension of the discussion [**here**](https://github.com/99designs/gqlgen/discussions/2600).

We have two mutations in our selection set:

```graphql
mutation {
createFoo(input: {id: "1"}) {
id
}

createBar(input: {id: "1"}) {
id
}
}
```

But we want these mutations to execute together rather than sequentially and
independently.

## Getting started

### Start the server

Start the GraphQL server on port 9097:

```shell
make run
```

### Hit the server

Visit [localhost:9097](http://localhost:9097/) and run the above mutation!