graphql-tag

February 1, 2026 ยท View on GitHub

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 'npm:graphql@16.12.0'
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 }))