Skip to main content
Deno 2 is finally here πŸŽ‰οΈ
Learn more

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://deno.land/x/graphql_deno@v15.0.0/mod.ts'
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, query, resolvers))