diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 802f3716..48a71ad9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -37,15 +37,19 @@ jobs: body: ${{ steps.tag_version.outputs.changelog }} if: steps.tag_version.outputs.new_tag != null - - name: Create Release + - name: Update Library Information run: | make update_brew_formula make update_podspec - git add . - git commit -m "Update Formula and PodSpec to $(VERSION)" - git push origin main - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - VERSION: ${{ steps.tag_version.outputs.new_version }} + - name: Create Pull Request + uses: peter-evans/create-pull-request + with: + commit-message: Bump Podspec and Brew formula + committer: GitHub + branch: chore/publish + delete-branch: true + title: Update Formula and PodSpec to ${{ steps.tag_version.outputs.new_version }} + body: 'This PR updates the referenced versions of the formula and podspec to the latest version.' + author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> if: steps.tag_version.outputs.new_tag != null diff --git a/Sources/GraphQL/Execution.swift b/Sources/GraphQL/Execution.swift index 3d109fcb..e0d0f55f 100644 --- a/Sources/GraphQL/Execution.swift +++ b/Sources/GraphQL/Execution.swift @@ -1,6 +1,6 @@ import Foundation -/// Parameters sent to the GraphQL server for evaluation. +/// The structure holding parameters for a GraphQL request. /// /// ExecutionArgs contains fields in the [GraphQL over HTTP spec](https://github.com/graphql/graphql-over-http/blob/main/spec/GraphQLOverHTTP.md#request-parameters) and [GraphQL over WebSocket](https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md#subscribe) spec. public struct ExecutionArgs: Codable, Equatable { @@ -38,7 +38,7 @@ extension ExecutionArgs: Hashable { } /// GraphQL execution result as outlined in the [GraphQL Spec](http://spec.graphql.org/October2021/#sec-Response-Format). -public struct ExecutionResult { +public struct ExecutionResult: Equatable, Encodable, Decodable { /// Result of a successfull execution of a query. public var data: AnyCodable @@ -64,8 +64,3 @@ public struct ExecutionResult { self.extensions = extensions } } - - -extension ExecutionResult: Equatable {} -extension ExecutionResult: Encodable {} -extension ExecutionResult: Decodable {} diff --git a/examples/thesocialnetwork/ios/TheSocialNetwork/Shared/Services/NetworkClient.swift b/examples/thesocialnetwork/ios/TheSocialNetwork/Shared/Services/NetworkClient.swift index 4715efcc..01f1d338 100644 --- a/examples/thesocialnetwork/ios/TheSocialNetwork/Shared/Services/NetworkClient.swift +++ b/examples/thesocialnetwork/ios/TheSocialNetwork/Shared/Services/NetworkClient.swift @@ -8,7 +8,7 @@ enum NetworkClient { // static private var http = URL(string: "http://127.0.0.1:4000/graphql")! // static private var ws = URL(string: "ws://127.0.0.1:4000/graphql")! - // With Hosted Server + // Hosted Server static private var http = URL(string: "https://thesocialnetwork.swift-graphql.com/graphql")! static private var ws = URL(string: "wss://thesocialnetwork.swift-graphql.com/graphql")! diff --git a/website/docs/network.mdx b/website/docs/network.mdx index c0e2ec0a..d06fe0dc 100644 --- a/website/docs/network.mdx +++ b/website/docs/network.mdx @@ -12,14 +12,16 @@ This section shows you how you can use it with the query-builder, but it shouldn To create a client you can either choose to go with default (basic) set of exchanges that don't require any setup, or customize it to fit your needs. You can start with the simpler configuration, but we encourage you to switch to the complete configuration soon, since it gives you more clarity and control over what's happening. ```swift -// Configuration of the client internals. -let config = ClientConfiguration() +let url = URL(string: "http://127.0.0.1:4000/graphql")! -// Default request used to send HTTP requests. -let request = URLRequest(url: URL(string: "http://127.0.0.1:4000/graphql")!) +// Simple +let client = SwiftGraphQLClient.Client(request: URLRequest(url: url)) +// Complete +let config = ClientConfiguration() let client = SwiftGraphQLClient.Client( - request: request, + // Default request used to send HTTP requests. + request: URLRequest(url: url), exchanges: [ DedupExchange(), CacheExchange(),