gqltagoperations

package
v0.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package gqltagoperations ports @graphql-codegen/gql-tag-operations — the "gen-dts" plugin used by the client preset to emit gql.ts (the Documents registry + graphql() function with typed overloads).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintDocument

func PrintDocument(doc *ast.QueryDocument) string

PrintDocument returns the printed SDL of an entire document. graphql-js joins definitions in AST order (fragments and operations interleaved), so we merge each document's ops and fragments by source line.

Types

type OperationOrFragment

type OperationOrFragment struct {
	InitialName string
	Definition  any // *ast.OperationDefinition | *ast.FragmentDefinition
}

OperationOrFragment is a named operation or fragment with its initial variable name (e.g. GetUserDocument).

type Plugin

type Plugin struct{}

Plugin implements plugin.Plugin for the "gen-dts" plugin (the name the client preset registers gql-tag-operations under).

func (Plugin) Generate

func (Plugin) Name

func (Plugin) Name() string

type SourceWithOperations

type SourceWithOperations struct {
	Source     *plugin.DocumentFile
	Operations []OperationOrFragment
}

SourceWithOperations mirrors the upstream type: one document source plus the named operations/fragments it contains.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL