-
-
Save handshake-engineering-blog/7a17b8d94e44d7fa368c97b8693157c4 to your computer and use it in GitHub Desktop.
1801584810_1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol Query { | |
/// The format of the response to expect from the GraphQL request | |
associatedtype Response: Decodable | |
/// The full string to send in the GraphQL request | |
var body: String { get } | |
/** | |
Decode a `Data` object from the GraphQL endpoint into our expected `Response` type. | |
- Parameter data: `Data` - bytes from the network | |
*/ | |
static func decodeResponse(_ data: Data) throws -> Response | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment