Categorygithub.com/fionahiklas/simple-static-graphql-api
module
0.0.0-20230524143149-81d16f753c17
Repository: https://github.com/fionahiklas/simple-static-graphql-api.git
Documentation: pkg.go.dev

# README

simple_static_graphql_api

Overview

Simple test application for GraphQL API in Go

Main build

Quickstart

Follow the instructions in docs/pact_testing.md to setup the Pact tools.

Development Notes

Details of how this project was created. You don't need to follow these instructions to get things up and running

Setup

  • Created initial module file
go mod init github.com/fionahiklas/simple-static-graphql-api
  • Adding dependency
go get github.com/graph-gophers/graphql-go
  • Created basic Makefile to be able to run tests and linting

Resolvers

  • For string fields which can be nullable (don't have !) the type is *string rather than string
  • To set pointer to empty string as a return value needs some work as per this post
  • It seems that [SomeGraphQLType!]! requires a Go slice so *[]*SomeGoStruct doesn't seem to be correct
  • Unless you allow struct resolvers (this is mentioned in the docs, TODO: add link) each resolver needs to implement accessors for every field in the GraphQL type

References

GraphQL

Other Go

Github Actions

Pact testing

Ruby

UNIX

# Packages

No description provided by the author
No description provided by the author