Network access GraphQL schema reference
This guide describes the additional fields in the Function schemas that relate to network access. To retrieve the latest GraphQL schema, you can use a CLI command. Other Functions follow the same pattern.
Anchor to Function return typesFunction return types
Function return types are specific to their associated target:
FunctionFetchResult
: The associated target ispurchase.[function-name].fetch
.FunctionRunResult
: The associated target ispurchase.[function-name].run
.
The outcome of the purchase.[function-name].fetch
target mutation is similar to other Function APIs and conveys an HttpRequest
to be executed. The HttpRequest
input contains traditional HTTP request fields.
The HttpRequestPolicy
field allows you to specify how Shopify should handle the request. Currently, you can only control the timeout execution. For more information, refer to Timeouts.
schema.graphql
The outcome of the purchase.[function-name].run
target mutation. Refer to the API documentation for domain specific details.
Anchor to Input fetchResultInput fetch Result
The fetchResult
input field is only available to the input query of the purchase.[function-name].run
target and isn't available for the purchase.[function-name].fetch
target. fetchResult
represents the HttpResponse
that derives from the HttpRequest
.
schema.graphql
Anchor to Next stepNext step
- Review the performance and resilience of using network access with Functions.