Skip to content

Latest commit

 

History

History

graphql

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

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!"
  }
}