RequestBodyCreator
PROTOCOL
RequestBodyCreator
Swift
1public protocol RequestBodyCreatorMethods
requestBody(for:sendQueryDocument:autoPersistQuery:)
Swift
1func requestBody<Operation: GraphQLOperation>(
2 for operation: Operation,
3 sendQueryDocument: Bool,
4 autoPersistQuery: Bool
5) -> JSONEncodableDictionaryCreates a JSONEncodableDictionary out of the passed-in operation
Parameters:
operation: The operation to use
sendQueryDocument: Whether or not to send the full query document. Should default to
true.autoPersistQuery: Whether to use auto-persisted query information. Should default to
false.
Returns: The created
JSONEncodableDictionary
Parameters
| Name | Description |
|---|---|
| operation | The operation to use |
| sendQueryDocument | Whether or not to send the full query document. Should default to true. |
| autoPersistQuery | Whether to use auto-persisted query information. Should default to false. |