import { gql } from "https://deno.land/x/graphql_tag@0.1.1/mod.ts";
Create a GraphQL AST from template literal
Examples
Example 1
Example 1
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' }
console.log(await graphql(buildASTSchema(typeDefs), query, resolvers))