Dagger
Search

graphql-client

This module uses a library call req to make a graphq request to a given url

Installation

dagger install github.com/ernesto27/daggerverse/graphql-client@v0.0.1

Entrypoint

Return Type
GraphqlClient
Example
dagger -m github.com/ernesto27/daggerverse/graphql-client@90753984249c1556ecc426038a954432122a8ff3 call \
func (m *myModule) example() *GraphqlClient  {
	return dag.
			GraphqlClient()
}
@function
def example() -> dag.GraphqlClient:
	return (
		dag.graphql_client()
	)
@func()
example(): GraphqlClient {
	return dag
		.graphqlClient()
}

Types

GraphqlClient 🔗

graphqlRequest() 🔗

Make a request to a graphql endpoint and returns a json response

Example usage: dagger call graphql-request –url “https://countries.trevorblades.com/” –message=“query {countries {name}}” stdout

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
urlString !-The url of the graphql server
messageString !-The graphql query definition
fileFile -The file name that have the graphql query definition
Example
dagger -m github.com/ernesto27/daggerverse/graphql-client@90753984249c1556ecc426038a954432122a8ff3 call \
 graphql-request --url string --message string
func (m *myModule) example(url string, message string) *Container  {
	return dag.
			GraphqlClient().
			GraphqlRequest(url, message)
}
@function
def example(url: str, message: str) -> dagger.Container:
	return (
		dag.graphql_client()
		.graphql_request(url, message)
	)
@func()
example(url: string, message: string): Container {
	return dag
		.graphqlClient()
		.graphqlRequest(url, message)
}