economical-graphql-server-demo

command module
v0.0.0-...-b1298dc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2023 License: MIT Imports: 0 Imported by: 0

README

economical-graphql-server-demo

run local server

make db.sqlite
go run cmd/server
deploy Lambda server
$ make server-lambda.zip
$ export AWS_PROFILE="hoge"
$ (cd terraform; terraform init; terraform apply)

sample query

{
  songs(first: 3) {
    edges {
      node {
        title
        releasedYear
        artist {
          name
        }
      }
    }
    pageInfo {
      startCursor
      endCursor
    }
    totalCount
  }
}
{
  "data": {
    "songs": {
      "edges": [
        {
          "node": {
            "title": "北ウイング",
            "releasedYear": 1984,
            "artist": {
              "name": "中森明菜"
            }
          }
        },
        {
          "node": {
            "title": "悲しみがとまらない",
            "releasedYear": 1983,
            "artist": {
              "name": "杏里"
            }
          }
        },
        {
          "node": {
            "title": "シンデレラ・ハネムーン",
            "releasedYear": 1978,
            "artist": {
              "name": "岩崎宏美"
            }
          }
        }
      ],
      "pageInfo": {
        "startCursor": "gaFp0wAAAAAAAAAB",
        "endCursor": "gaFp0wAAAAAAAAAD"
      },
      "totalCount": 19
    }
  }
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL