graphutils

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

package graphutils provides utility functions for working with graph requests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckForRequestedField

func CheckForRequestedField(ctx context.Context, fieldName string) bool

CheckForRequestedField checks if the requested field is in the list of fields from the request

func GetInputFieldVariableName added in v0.7.4

func GetInputFieldVariableName(ctx context.Context) string

GetInputFieldVariableName returns the input field variable name from the graphql request this is used to skip the input field when processing file uploads for bulk create mutations

func GetMapInputVariableByName

func GetMapInputVariableByName(ctx context.Context, fieldName string) *map[string]any

GetMapInputVariableByName returns the input variable by name for map variables (e.g. input)

func GetPreloads

func GetPreloads(ctx context.Context) []string

GetPreloads returns the preloads for the current graphql operation

func GetStringInputVariableByName

func GetStringInputVariableByName(ctx context.Context, fieldName string) *string

GetStringInputVariableByName returns the input variable by name for string variables (e.g. id)

Types

This section is empty.

Jump to

Keyboard shortcuts

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