graphqlsec

package
v1.67.0-rc.5 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: Apache-2.0, BSD-3-Clause, Apache-2.0 Imports: 7 Imported by: 0

README

GraphQL Threat Monitoring

This package provides dyngo support for GraphQL operations, which are listened to according to the following sequence diagram:

sequenceDiagram
  participant Root
  participant Request
  participant Execution
  participant Field

  Root ->>+ Request: graphqlsec.StartRequest(...)

  Request ->>+ Execution: grapgqlsec.StartExecution(...)

  par for each field
  Execution ->>+ Field: graphqlsec.StartField(...)
  Field -->>- Execution: field.Finish(...)
  end

  Execution -->>- Request: execution.Finish(...)

  Request -->>- Root: request.Finish(...)

Documentation

Overview

Package graphql is the GraphQL instrumentation API and contract for AppSec defining an abstract run-time representation of AppSec middleware. GraphQL integrations must use this package to enable AppSec features for GraphQL, which listens to this package's operation events.

Package graphql is the GraphQL instrumentation API and contract for AppSec defining an abstract run-time representation of AppSec middleware. GraphQL integrations must use this package to enable AppSec features for GraphQL, which listens to this package's operation events.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartExecutionOperation

StartExecutionOperation starts a new GraphQL query operation, along with the given arguments, and emits a start event up in the operation stack. The operation is tracked on the returned context, and can be extracted later on using FromContext.

func StartRequestOperation

func StartRequestOperation(ctx context.Context, span trace.TagSetter, args types.RequestOperationArgs) (context.Context, *types.RequestOperation)

StartRequestOperation starts a new GraphQL request operation, along with the given arguments, and emits a start event up in the operation stack. The operation is usually linked to tge global root operation. The operation is tracked on the returned context, and can be extracted later on using FromContext.

func StartResolveOperation

func StartResolveOperation(ctx context.Context, span trace.TagSetter, args types.ResolveOperationArgs) (context.Context, *types.ResolveOperation)

StartResolveOperation starts a new GraphQL Resolve operation, along with the given arguments, and emits a start event up in the operation stack. The operation is tracked on the returned context, and can be extracted later on using FromContext.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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