deno.land / x / opine@2.3.4 / examples / graphql

graphql

Example of how to use Opine with gql for a simple GraphQL server.

How to run this example

deno run --allow-net --allow-read ./examples/graphql/index.ts

if have the repo cloned locally OR

deno run --allow-net --allow-read https://raw.githubusercontent.com/cmorten/opine/main/examples/graphql/index.ts

if you don't!

Then try:

  1. Opening a GraphQL playground on http//localhost:3000/graphql
  2. Writing a query:
{
  hello
}
  1. You will get this:
{
  "data": {
    "hello": "Hello World!"
  }
}
opine

Version Info

Tagged at
a year ago