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.
Function return types
Anchor link to section titled "Function 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
.
FunctionFetchResult
Anchor link to section titled "FunctionFetchResult"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.
FunctionRunResult
Anchor link to section titled "FunctionRunResult"The outcome of the purchase.[function-name].run
target mutation. Refer to the API documentation for domain specific details.
Input fetchResult
Anchor link to section titled "Input fetchResult"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
.
- Review the performance and resilience of using network access with Functions.