Skip to content

[v2] GraphQLOperation.Variable Cleanup #699

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Tests/ApolloInternalTestHelpers/MockNetworkTransport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ public final class MockNetworkTransport: NetworkTransport {
public let mockServer: MockGraphQLServer
public let requestChainTransport: RequestChainNetworkTransport

public var url: URL { requestChainTransport.endpointURL }

public init(
mockServer: MockGraphQLServer = MockGraphQLServer(),
store: ApolloStore
Expand Down Expand Up @@ -87,7 +89,7 @@ public final class MockNetworkTransport: NetworkTransport {
}

let httpResponse = HTTPURLResponse(
url: TestURL.mockServer.url,
url: request.url!,
statusCode: 200,
httpVersion: nil,
headerFields: nil
Expand Down
11 changes: 0 additions & 11 deletions Tests/ApolloTests/ApolloStore+ReaderWriterTests.swift

This file was deleted.

1 change: 1 addition & 0 deletions Tests/ApolloTests/ApolloStore_BatchedLoadTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
XCTAssertEqual(data.hero?.name, "R2-D2")
XCTAssertEqual(data.hero?.friends?.count, 100)

// 3 loads: ROOT_QUERY.hero, hero.friends, list of friends
XCTAssertEqual(cache.numberOfBatchLoads, 3)
}

Expand Down Expand Up @@ -173,7 +174,7 @@

let query = MockQuery<GivenSelectionSet>()

try await withThrowingTaskGroup { group in

Check failure on line 177 in Tests/ApolloTests/ApolloStore_BatchedLoadTests.swift

View workflow job for this annotation

GitHub Actions / Apollo Unit Tests - macOS

missing argument for parameter 'of' in call
for _ in (1...10) {
group.addTask {
let graphQLResult = try await store.load(query)
Expand Down
1 change: 0 additions & 1 deletion Tests/ApolloTests/AutomaticPersistedQueriesTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@
expectation.to(equal("{\"episode\":\"\(episode.rawValue)\"}"))

case .none:
#warning("TODO: write test to test this case actually happens")
expectation.to(equal("{}"))

case .null:
Expand Down Expand Up @@ -751,7 +750,7 @@
store: store,
endpointURL: Self.endpoint,
apqConfig: .init(autoPersistQueries: true),
)

Check failure on line 753 in Tests/ApolloTests/AutomaticPersistedQueriesTests.swift

View workflow job for this annotation

GitHub Actions / Apollo Unit Tests - macOS

unexpected ',' separator

let query = MockPersistedOnlyQuery(episode: .some(.EMPIRE))

Expand Down
Loading
Loading