fnh

package module
v0.0.0-...-e0d9ac3 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2019 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Discord

Note: The canary branch is under heavy development – the stable release branch is master.

Usage

Documentation

Caught a Bug?

  1. Fork this repository to your own GitHub account and then clone it to your local device

As always, you should use yarn test to run the tests and see if your changes have broken anything.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fnh

type Fnh struct {
	Context fdk.Context
	Client  *http.Client
}

Fnh is the Fn Helper utility.

func Create

func Create(ctx context.Context) *Fnh

Create creates a new Fnh instance from the Fn context.

func (*Fnh) GraphQL

func (f *Fnh) GraphQL(greq *GraphQLRequest, out interface{}) error

GraphQL Query via the /v1/graphql endpoint of the Data service.

func (*Fnh) Query

func (f *Fnh) Query(qreq *QueryRequest) (*QueryResponse, error)

Query runs a query request to the GraphQL service via the /query endpoint.

type GraphQLRequest

type GraphQLRequest struct {
	Query string                 `json:"query"`
	Vars  map[string]interface{} `json:"vars"`
}

GraphQLRequest is a request for a GraphQL query.

type QueryErrorResponse

type QueryErrorResponse struct {
	Path  string `json:"path"`
	Error string `json:"error"`
}

QueryErrorResponse is the response for a Query request when it fails.

type QueryRequest

type QueryRequest struct {
	Type string                 `json:"type"`
	Args map[string]interface{} `json:"args"`
}

QueryRequest is a request sent to

type QueryResponse

type QueryResponse struct {
	ResultType string     `json:"result_type"`
	Result     [][]string `json:"result"`
}

QueryResponse is the response for a Query request.

Jump to

Keyboard shortcuts

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