Categorygithub.com/ncostamagna/stack_graphql
module
0.0.0-20231125165406-f120a037404a
Repository: https://github.com/ncostamagna/stack_graphql.git
Documentation: pkg.go.dev

# README

Setup

go get github.com/graphql-go/graphql

Examples

Example 1

Very basic example, is a 'hello world'

Example 2

Is a more complex example, graphql with structs

Example 3

Is an application web with graphQL without any external packages (without gorilla mux and gin)

gplgen

Client

Insomnia

Body: GraphQL

# Get products
URL: http://localhost:8080/products?query={list{id,name,info,price}} 

# Create product
URL: http://localhost:8080/products?query=mutation{create(name:"Inca Kola",info:"Inca Kola is a soft drink that was created in Peru in 1935 by British immigrant Joseph Robinson Lindley using lemon verbena (wiki)",price:1.99){id,name,info,price}}

gplgen

mkdir example
cd example
go mod init example

go get -d github.com/99designs/gqlgen

printf '// +build tools\npackage tools\nimport _ "github.com/99designs/gqlgen"' | gofmt > tools.go
go mod tidy

# create a new project
go run github.com/99designs/gqlgen init

Apollo

# Packages

No description provided by the author