Skip to content

🦕 Create a GraphQL schema AST from template literal. Deno port of `graphql-tag` library

License

Notifications You must be signed in to change notification settings

deno-libs/graphql_tag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

graphql-tag

GitHub release (latest by date) GitHub Workflow Status Codecov

🦕 Deno port of graphql-tag library.

Create a GraphQL schema AST from template literal.

Example

import { buildASTSchema, graphql } from 'https://esm.sh/[email protected]'
import { gql } from 'https://deno.land/x/graphql_tag/mod.ts'

const typeDefs = gql`
  type Query {
    hello: String
  }
`

const query = `{ hello }`

const resolvers = { hello: () => 'world' }

const schema = buildASTSchema(typeDefs)

console.log(await graphql({ schema, source: query, rootValue: resolvers }))

About

🦕 Create a GraphQL schema AST from template literal. Deno port of `graphql-tag` library

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project