graphqlschemaintrospection

package
v2.44.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetadataObject

type MetadataObject struct {
	MetadataDir string
	// contains filtered or unexported fields
}

func New

func New(ec *cli.ExecutionContext, baseDir string) *MetadataObject

func (*MetadataObject) BaseDirectory

func (o *MetadataObject) BaseDirectory() string

func (*MetadataObject) Build

func (o *MetadataObject) Build() (map[string]interface{}, error)

func (*MetadataObject) CreateFiles

func (o *MetadataObject) CreateFiles() error

func (*MetadataObject) Export

func (o *MetadataObject) Export(metadata map[string]yaml.Node) (map[string][]byte, error)

Export implementation here can probably use metadataobject.DefaultExport the only thing stopping us from using it is the metadata API behaviour for this object. For other objects an empty value ([] or {}) depending on what type of object will "reset" it. ie If I wanted to clear all the cron triggers on the server I could send metadata JSON with "cron_triggers": []. Similarly, If I try to "clear" "graphql_schema_introspection" it'll not work

$ hasura metadata apply -o json --dry-run

{
 // ....other objects skipped for brevity
 "graphql_schema_introspection": {}
}

$ hasura md apply FATA[0001] error applying metadata

{
 "path": "$.args.metadata.graphql_schema_introspection",
 "error": "the key 'disabled_for_roles' was not present",
 "code": "parse-failed"
}

func (*MetadataObject) Filename

func (o *MetadataObject) Filename() string

func (*MetadataObject) GetFiles

func (o *MetadataObject) GetFiles() ([]string, error)

func (*MetadataObject) Key

func (o *MetadataObject) Key() string

func (*MetadataObject) Validate

func (o *MetadataObject) Validate() error

func (*MetadataObject) WriteDiff

func (o *MetadataObject) WriteDiff(opts metadataobject.WriteDiffOpts) error

Jump to

Keyboard shortcuts

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