Join us from October 8-10 in New York City to learn the latest tips, trends, and news about GraphQL Federation and API platform engineering.Join us for GraphQL Summit 2024 in NYC
Docs
Start for Free
You're viewing documentation for a previous version of this software. Switch to the latest stable version.


PROTOCOL

UploadingNetworkTransport

public protocol UploadingNetworkTransport: NetworkTransport

A network transport which can also handle uploads of files.

Methods

upload(operation:files:callbackQueue:completionHandler:)

func upload<Operation: GraphQLOperation>(
operation: Operation,
files: [GraphQLFile],
callbackQueue: DispatchQueue,
completionHandler: @escaping (Result<GraphQLResult<Operation.Data>,Error>) -> Void) -> Cancellable

Uploads the given files with the given .

  • Parameters:
    • operation: The operation to send
    • files: An array of GraphQLFile objects to send.
    • callbackQueue: The queue to call back on with the results. Should default to .main.
    • completionHandler: The completion handler to execute when the request completes or errors
  • Returns: An object that can be used to cancel an in progress request.

Parameters

NameDescription
operationThe operation to send
filesAn array of GraphQLFile objects to send.
callbackQueueThe queue to call back on with the results. Should default to .main.
completionHandlerThe completion handler to execute when the request completes or errors
Next
Introduction
Rate articleRateEdit on GitHubEditForumsDiscord

© 2024 Apollo Graph Inc., d/b/a Apollo GraphQL.

Privacy Policy

Company