fetch

package
v0.0.0-...-8832f83 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package fetch provides the Local->Fetch GraphQL API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build() *graphql.Field

Build builds the object containing the Local->Fetch Fields, such as Things/Actions

Types

type Contextionary

type Contextionary interface {
	SchemaSearch(p contextionary.SearchParams) (contextionary.SearchResults, error)
}

Contextionary is a local abstraction on the contextionary that needs to be provided to the graphQL API in order to resolve Local.Fetch queries.

type Params

type Params struct {
	Kind               kind.Kind
	PossibleClassNames contextionary.SearchResults
	Properties         []Property
}

Params to describe the Local->GetMeta->Kind->Class query. Will be passed to the individual connector methods responsible for resolving the GetMeta query.

type Property

type Property struct {
	PossibleNames contextionary.SearchResults
	Match         PropertyMatch
}

Property is a combination of possible names to use for the property as well as a match object to perform filtering actions in the db connector based on this property

type PropertyMatch

type PropertyMatch struct {
	Operator common_filters.Operator
	Value    *common_filters.Value
}

PropertyMatch defines how in the db connector this property should be used as a filter

type Resolver

type Resolver interface {
	LocalFetchKindClass(info *Params) (interface{}, error)
}

Resolver is a local interface that can be composed with other interfaces to form the overall GraphQL API main interface. All data-base connectors that want to support the GetMeta feature must implement this interface.

Jump to

Keyboard shortcuts

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