how to use grapqhl-scalars with graphql-tag “gql`” syntax?

how to use grapqhl-scalars with graphql-tag “gql`” syntax?


0

I am reading through this page: https://the-guild.dev/graphql/scalars/docs/quick-start
It explains how to get pre-built graphql scalars.

The examples on the page about how to use these scalars, seem to be using a code-first approach to building a schema.

I am not sure how to use these scalars with the SDL-first approach where I have a string literal defined like this:

import { typeDefs as scalarTypeDefs } from 'graphql-scalars'

export const typeDefs = gql`
  # how do I use scalarTypeDefs here???
  type Query {
  ...
  }
  type Foo { ... }
  type Bar { ... }
`


Load 5 more related questions


Show fewer related questions

0



Leave a Reply

Your email address will not be published. Required fields are marked *