Skip to content

Commit

Permalink
heading tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
vektah committed Feb 11, 2018
1 parent e032c1d commit 5fabffa
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This is a library for quickly creating a strictly typed graphql servers in golan

`go get -u github.com/vektah/gqlgen`

#### Try it
### Try it

Define your schema first:
```graphql schema
Expand Down Expand Up @@ -86,9 +86,9 @@ func main() {
}
```

#### Prior art
### Prior art

##### https://github.com/neelance/graphql-go
#### neelance/graphql-go

The gold standard of graphql servers in golang. It provided the inspiration, and a good chunk of code for gqlgen. Its
strictly typed and uses your schema and some reflection to build up a resolver graph. The only downside is the amount
Expand All @@ -104,7 +104,9 @@ Reasons to use gqlgen instead:
- arrays work just fine https://github.com/neelance/graphql-go/issues/144
- first class dataloader support, see examples/dataloader

##### https://github.com/graphql-go/graphql
https://github.com/neelance/graphql-go

#### graphql-go/graphql

With this library you write the schema using its internal DSL as go code, and bind in all your resolvers. No go type
information is used so you can dynamically define new schemas which could be useful for building schema stitching
Expand All @@ -116,10 +118,14 @@ Reasons to use gqlgen instead:
- horrible runtime error messages when you mess up defining your schema https://github.com/graphql-go/graphql/issues/234
- reviewing schema changes written in a go dsl is really hard across teams

##### https://github.com/Applifier/graphql-codegen and https://github.com/euforic/graphql-gen-go
see https://github.com/graphql-go/graphql

#### Applifier/graphql-codegen and euforic/graphql-gen-go

Very similar idea, take your schema and generate the code from it.

gqlgen will build the entire execution environment statically, allowing go's type checker to validate everything across
the the graph. These two libraries generate resolvers that are loaded using reflection by the neelance library, so they
have most of the downsides of that with an added layer of complexity.

see https://github.com/Applifier/graphql-codegen and https://github.com/euforic/graphql-gen-go

0 comments on commit 5fabffa

Please sign in to comment.