Skip to content
Discussion options

You must be logged in to vote

@mikehaertl Operation Document Nodes are treated like variables. You can import/export them like any other part of your application. Fragment names are globally unique.

Example import/export document

// a.ts
import { graphql } from "./graphql"

export const FooQuery = graphql(/* GraphQL */ `
  query Foo {
    foo
  }
`)

// b.ts
import { FooQuery } from "./a.js"

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mikehaertl
Comment options

Answer selected by mikehaertl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants