From 6ad1d97e52a5c003f8014dc0ed00663caf4a1118 Mon Sep 17 00:00:00 2001 From: Mathew Byrne Date: Mon, 4 Mar 2019 10:07:26 +1100 Subject: [PATCH 1/4] Move feature comparison --- docs/content/feature-comparison.md | 29 +++++++++++++++++++++++++++++ docs/static/main.css | 18 +++++++++++++++++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 docs/content/feature-comparison.md diff --git a/docs/content/feature-comparison.md b/docs/content/feature-comparison.md new file mode 100644 index 00000000000..9c1bec69d07 --- /dev/null +++ b/docs/content/feature-comparison.md @@ -0,0 +1,29 @@ +--- +linkTitle: Feature Comparison +title: Comparing Features of Other Go GraphQL Implementations +description: Comparing Features of Other Go GraphQL Implementations +menu: main +weight: -1 +--- + +| | [gqlgen](https://github.com/99designs/gqlgen) | [gophers](https://github.com/graph-gophers/graphql-go) | [graphql-go](https://github.com/graphql-go/graphql) | [thunder](https://github.com/samsarahq/thunder) | +| --------: | :-------- | :-------- | :-------- | :-------- | +| Kind | schema first | schema first | run time types | struct first | +| Boilerplate | less | more | more | some | +| Docs | [docs](https://gqlgen.com) & [examples](https://github.com/99designs/gqlgen/tree/master/example) | [examples](https://github.com/graph-gophers/graphql-go/tree/master/example/starwars) | [examples](https://github.com/graphql-go/graphql/tree/master/examples) | [examples](https://github.com/samsarahq/thunder/tree/master/example)| +| Query | 👍 | 👍 | 👍 | 👍 | +| Mutation | 👍 | 🚧 [pr](https://github.com/graph-gophers/graphql-go/pull/182) | 👍 | 👍 | +| Subscription | 👍 | 🚧 [pr](https://github.com/graph-gophers/graphql-go/pull/182) | 👍 | 👍 | +| Type Safety | 👍 | 👍 | ⛔️ | 👍 | +| Type Binding | 👍 | 🚧 [pr](https://github.com/graph-gophers/graphql-go/pull/194) | ⛔️ | 👍 | +| Embedding | 👍 | ⛔️ | 🚧 [pr](https://github.com/graphql-go/graphql/pull/371) | ⛔️ | +| Interfaces | 👍 | 👍 | 👍 | ⛔️ [is](https://github.com/samsarahq/thunder/issues/78) | +| Generated Enums | 👍 | ⛔️ | ⛔️ | ⛔️ | +| Generated Inputs | 👍 | ⛔️ | ⛔️ | ⛔️ | +| Stitching gql | 🕐 [is](https://github.com/99designs/gqlgen/issues/5) | ⛔️ | ⛔️ | ⛔️ | +| Opentracing | 👍 | 👍 | ⛔️ | ✂️[pr](https://github.com/samsarahq/thunder/pull/77) | +| Hooks for error logging | 👍 | ⛔️ | ⛔️ | ⛔️ | +| Dataloading | 👍 | 👍 | 👍 | ⚠️ | +| Concurrency | 👍 | 👍 | 👍 | 👍 | +| Custom errors & error.path | 👍 | ⛔️ [is](https://github.com/graphql-go/graphql/issues/259) | ⛔️ | ⛔️ | +| Query complexity | 👍 | ⛔️ [is](https://github.com/graphql-go/graphql/issues/231) | ⛔️ | ⛔️ | diff --git a/docs/static/main.css b/docs/static/main.css index 563955595f5..0e26e83a766 100644 --- a/docs/static/main.css +++ b/docs/static/main.css @@ -430,4 +430,20 @@ blockquote p:first-of-type { blockquote code { background-color: var(--color-blockquote-highlight); -} \ No newline at end of file +} + +table { + width: 100%; +} + +td, th { + padding: 0.2em 1em; +} + +tr { + border-bottom: 1px solid var(--color-heading-background); +} + +tr td:first-child, th { + font-weight: bold; +} From d81670d8bf568c4d5ed5b8db1274c3cf496db416 Mon Sep 17 00:00:00 2001 From: Mathew Byrne Date: Mon, 4 Mar 2019 11:34:10 +1100 Subject: [PATCH 2/4] Add initial contributing guidelines --- CONTRIBUTING.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000000..8981109add0 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,27 @@ +# Contributing + +Want to contribute to gqlgen? Here are some guidelines for how we accept help. + +## Getting in Touch + +Our [gitter](https://gitter.im/gqlgen/Lobby) channel is the best place to ask questions or get advice on using gqlgen. + +## Reporting Bugs and Issues + + We use [GitHub Issues](https://github.com/99designs/gqlgen/issues) to track bugs, so please do a search before submitting to ensure your problem isn't already tracked. + +### New Issues + +Please provide the expected and observed behaviours in your issue. A minimal GraphQL schema or configuration file should be provided where appropriate. + +## Proposing a Change + +If you intend to implement a feature for gqlgen, or make a non-trivial change to the current implementation, we recommend [first filing an issue](https://github.com/99designs/gqlgen/issues/new) marked with the `proposal` tag, so that the engineering team can provide guidance and feedback on the direction of an implementation. This also help ensure that other people aren't also working on the same thing. + +Bug fixes are welcome and should come with appropriate test coverage. + +New features should be made against the `next` branch. + +### License + +By contributing to gqlgen, you agree that your contributions will be licensed under its MIT license. From 25bdf3d6bff9790ffb0eb8ef7b4422e4008386f7 Mon Sep 17 00:00:00 2001 From: Mathew Byrne Date: Mon, 4 Mar 2019 11:41:15 +1100 Subject: [PATCH 3/4] Consolidate Introduction documents --- CONTRIBUTING.md | 2 +- README.md | 60 +++++++++++++++++------------------- docs/content/introduction.md | 28 +++++++++-------- 3 files changed, 45 insertions(+), 45 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8981109add0..461709ecf8e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Contributing +# Contribution Guidelines Want to contribute to gqlgen? Here are some guidelines for how we accept help. diff --git a/README.md b/README.md index 708f66127d1..162983667af 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,30 @@ # gqlgen [![CircleCI](https://badgen.net/circleci/github/99designs/gqlgen/master)](https://circleci.com/gh/99designs/gqlgen) [![Read the Docs](https://badgen.net/badge/docs/available/green)](http://gqlgen.com/) -This is a library for quickly creating strictly typed graphql servers in golang. - -See the [docs](https://gqlgen.com/) for a getting started guide. - -### Feature comparison - -| | [gqlgen](https://github.com/99designs/gqlgen) | [gophers](https://github.com/graph-gophers/graphql-go) | [graphql-go](https://github.com/graphql-go/graphql) | [thunder](https://github.com/samsarahq/thunder) | -| --------: | :-------- | :-------- | :-------- | :-------- | -| Kind | schema first | schema first | run time types | struct first | -| Boilerplate | less | more | more | some | -| Docs | [docs](https://gqlgen.com) & [examples](https://github.com/99designs/gqlgen/tree/master/example) | [examples](https://github.com/graph-gophers/graphql-go/tree/master/example/starwars) | [examples](https://github.com/graphql-go/graphql/tree/master/examples) | [examples](https://github.com/samsarahq/thunder/tree/master/example)| -| Query | :+1: | :+1: | :+1: | :+1: | -| Mutation | :+1: | :construction: [pr](https://github.com/graph-gophers/graphql-go/pull/182) | :+1: | :+1: | -| Subscription | :+1: | :construction: [pr](https://github.com/graph-gophers/graphql-go/pull/182) | :+1: | :+1: | -| Type Safety | :+1: | :+1: | :no_entry: | :+1: | -| Type Binding | :+1: | :construction: [pr](https://github.com/graph-gophers/graphql-go/pull/194) | :no_entry: | :+1: | -| Embedding | :+1: | :no_entry: | :construction: [pr](https://github.com/graphql-go/graphql/pull/371) | :no_entry: | -| Interfaces | :+1: | :+1: | :+1: | :no_entry: [is](https://github.com/samsarahq/thunder/issues/78) | -| Generated Enums | :+1: | :no_entry: | :no_entry: | :no_entry: | -| Generated Inputs | :+1: | :no_entry: | :no_entry: | :no_entry: | -| Stitching gql | :clock1: [is](https://github.com/99designs/gqlgen/issues/5) | :no_entry: | :no_entry: | :no_entry: | -| Opentracing | :+1: | :+1: | :no_entry: | :scissors:[pr](https://github.com/samsarahq/thunder/pull/77) | -| Hooks for error logging | :+1: | :no_entry: | :no_entry: | :no_entry: | -| Dataloading | :+1: | :+1: | :+1: | :warning: | -| Concurrency | :+1: | :+1: | :+1: | :+1: | -| Custom errors & error.path | :+1: | :no_entry: [is](https://github.com/graphql-go/graphql/issues/259) | :no_entry: | :no_entry: | -| Query complexity | :+1: | :no_entry: [is](https://github.com/graphql-go/graphql/issues/231) | :no_entry: | :no_entry: | - - -### Help - -Create an issue or join the conversation on [gitter](https://gitter.im/gqlgen) +## What is gqlgen? + +[gqlgen](https://github.com/99designs/gqlgen) is a Go library for building GraphQL servers without any fuss. gqlgen is: + + - **Schema first** — Define your API using the GraphQL [Schema Definition Language](http://graphql.org/learn/schema/). + - **Type safe** — You should never see `map[string]interface{}` here. + - **Codegen** — Let us generate the boring bits, so you can build your app quickly. + +[Feature Comparison](https://gqlgen.com/feature-comparison/) + +## Getting Started + +First work your way through the [Getting Started](ttps://gqlgen.com/getting-started/) tutorial. + +If you can't find what your looking for, look at our [examples](https://github.com/99designs/gqlgen/tree/master/example) for example usage of gqlgen. + +## Reporting Issues + +If you think you've found a bug, or something isn't behaving the way you think it should, please raise an [issue](https://github.com/99designs/gqlgen/issues) on GitHub. + +## Contributing + +Read our [Contribution Guidelines](https://github.com/99designs/gqlgen/blob/master/CONTRIBUTING.md) for information on how you can help out gqlgen. + +## Talks & Blog Posts + + - [Christopher Biscardi @ Gophercon UK 2018](https://youtu.be/FdURVezcdcw) + - [Introducing gqlgen: a GraphQL Server Generator for Go](https://99designs.com.au/blog/engineering/gqlgen-a-graphql-server-generator-for-go/) diff --git a/docs/content/introduction.md b/docs/content/introduction.md index 1d98c9b1e1f..ce43ff7ea8a 100644 --- a/docs/content/introduction.md +++ b/docs/content/introduction.md @@ -1,31 +1,35 @@ --- linkTitle: Introduction -title: Type-safe graphql for golang +title: Type-safe GraphQL for Go type: homepage date: 2018-03-17T13:06:47+11:00 --- ## What is gqlgen? -[gqlgen](https://github.com/99designs/gqlgen) is a golang library for building graphql servers without any fuss. gqlgen is: +[gqlgen](https://github.com/99designs/gqlgen) is a Go library for building GraphQL servers without any fuss. gqlgen is: - - Schema first: You define your API using the graphql [Schema Definition Language](http://graphql.org/learn/schema/) - - Type safe: You should never see `map[string]interface{}` here. - - Codegen: Let us generate the boring bits, so you can build your app quickly. + - **Schema first** — Define your API using the GraphQL [Schema Definition Language](http://graphql.org/learn/schema/). + - **Type safe** — You should never see `map[string]interface{}` here. + - **Codegen** — Let us generate the boring bits, so you can build your app quickly. +[Feature Comparison]({{< ref "feature-comparison.md" >}}) -## Getting started +## Getting Started -First take a look at the [Getting Started]({{< ref "getting-started.md" >}}) tutorial. +First work your way through the [Getting Started]({{< ref "getting-started.md" >}}) tutorial. -If you cant find what your looking for, maybe the [examples](https://github.com/99designs/gqlgen/tree/master/example) will help. +If you can't find what your looking for, look at our [examples](https://github.com/99designs/gqlgen/tree/master/example) for example usage of gqlgen. +## Reporting Issues -## Getting help +If you think you've found a bug, or something isn't behaving the way you think it should, please raise an [issue](https://github.com/99designs/gqlgen/issues) on GitHub. -If you think you've found a bug, or something isn't behaving the way you think it should please raise an [issue](https://github.com/99designs/gqlgen/issues) on github. +## Contributing +Read our [Contribution Guidelines](https://github.com/99designs/gqlgen/blob/master/CONTRIBUTING.md) for information on how you can help out gqlgen. -## Talks +## Talks & Blog Posts - - [Christopher Biscardi @ Gophercon UK 2018](https://youtu.be/FdURVezcdcw) + - [Christopher Biscardi @ Gophercon UK 2018](https://youtu.be/FdURVezcdcw) + - [Introducing gqlgen: a GraphQL Server Generator for Go](https://99designs.com.au/blog/engineering/gqlgen-a-graphql-server-generator-for-go/) From 5c692e294e71aa6846192ce71e90c983d760d114 Mon Sep 17 00:00:00 2001 From: Mathew Byrne Date: Mon, 4 Mar 2019 12:38:04 +1100 Subject: [PATCH 4/4] User README as canonical introduction --- docs/content/_introduction.md | 1 + docs/content/introduction.md | 29 ----------------------------- docs/layouts/index.html | 5 +++++ 3 files changed, 6 insertions(+), 29 deletions(-) create mode 120000 docs/content/_introduction.md diff --git a/docs/content/_introduction.md b/docs/content/_introduction.md new file mode 120000 index 00000000000..fe840054137 --- /dev/null +++ b/docs/content/_introduction.md @@ -0,0 +1 @@ +../../README.md \ No newline at end of file diff --git a/docs/content/introduction.md b/docs/content/introduction.md index ce43ff7ea8a..6ee0d144fa9 100644 --- a/docs/content/introduction.md +++ b/docs/content/introduction.md @@ -4,32 +4,3 @@ title: Type-safe GraphQL for Go type: homepage date: 2018-03-17T13:06:47+11:00 --- - -## What is gqlgen? - -[gqlgen](https://github.com/99designs/gqlgen) is a Go library for building GraphQL servers without any fuss. gqlgen is: - - - **Schema first** — Define your API using the GraphQL [Schema Definition Language](http://graphql.org/learn/schema/). - - **Type safe** — You should never see `map[string]interface{}` here. - - **Codegen** — Let us generate the boring bits, so you can build your app quickly. - -[Feature Comparison]({{< ref "feature-comparison.md" >}}) - -## Getting Started - -First work your way through the [Getting Started]({{< ref "getting-started.md" >}}) tutorial. - -If you can't find what your looking for, look at our [examples](https://github.com/99designs/gqlgen/tree/master/example) for example usage of gqlgen. - -## Reporting Issues - -If you think you've found a bug, or something isn't behaving the way you think it should, please raise an [issue](https://github.com/99designs/gqlgen/issues) on GitHub. - -## Contributing - -Read our [Contribution Guidelines](https://github.com/99designs/gqlgen/blob/master/CONTRIBUTING.md) for information on how you can help out gqlgen. - -## Talks & Blog Posts - - - [Christopher Biscardi @ Gophercon UK 2018](https://youtu.be/FdURVezcdcw) - - [Introducing gqlgen: a GraphQL Server Generator for Go](https://99designs.com.au/blog/engineering/gqlgen-a-graphql-server-generator-for-go/) diff --git a/docs/layouts/index.html b/docs/layouts/index.html index 9e5776800d9..f3e8fa58eb2 100644 --- a/docs/layouts/index.html +++ b/docs/layouts/index.html @@ -11,6 +11,11 @@

{{ .LinkTitle }}

{{ .Content }} + {{.Scratch.Set "intro" (readFile "content/_introduction.md")}} + {{.Scratch.Set "intro" (split (.Scratch.Get "intro") "\n")}} + {{.Scratch.Set "intro" (after 2 (.Scratch.Get "intro"))}} + {{.Scratch.Set "intro" (delimit (.Scratch.Get "intro") "\n")}} + {{.Scratch.Get "intro"|markdownify}}
{{ end }}