Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/dataconnect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ env:
FDC_JAVA_VERSION: ${{ inputs.javaVersion || '17' }}
FDC_ANDROID_EMULATOR_API_LEVEL: ${{ inputs.androidEmulatorApiLevel || '34' }}
FDC_NODEJS_VERSION: ${{ inputs.nodeJsVersion || '20' }}
FDC_FIREBASE_TOOLS_VERSION: ${{ inputs.firebaseToolsVersion || '14.16.0' }}
FDC_FIREBASE_TOOLS_VERSION: ${{ inputs.firebaseToolsVersion || '14.18.0' }}
FDC_FIREBASE_TOOLS_DIR: /tmp/firebase-tools
FDC_FIREBASE_COMMAND: /tmp/firebase-tools/node_modules/.bin/firebase
FDC_PYTHON_VERSION: ${{ inputs.pythonVersion || '3.13' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dataconnect_demo_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:

env:
FDC_NODE_VERSION: ${{ inputs.nodeVersion || '20' }}
FDC_FIREBASE_TOOLS_VERSION: ${{ inputs.firebaseToolsVersion || '14.16.0' }}
FDC_FIREBASE_TOOLS_VERSION: ${{ inputs.firebaseToolsVersion || '14.18.0' }}
FDC_JAVA_VERSION: ${{ inputs.javaVersion || '17' }}
FDC_FIREBASE_TOOLS_DIR: ${{ github.workspace }}/firebase-tools
FDC_FIREBASE_COMMAND: ${{ github.workspace }}/firebase-tools/node_modules/.bin/firebase
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.firebase.dataconnect.connectors.demo

import com.google.firebase.dataconnect.connectors.demo.testutil.DemoConnectorIntegrationTestBase
import com.google.firebase.dataconnect.testutil.property.arbitrary.dataConnect
import io.kotest.assertions.withClue
import io.kotest.matchers.nulls.shouldNotBeNull
import io.kotest.matchers.shouldBe
import io.kotest.property.Arb
import io.kotest.property.arbitrary.next
import kotlinx.coroutines.test.runTest
import org.junit.Test

class EmptySelectionSetIntegrationTest : DemoConnectorIntegrationTestBase() {

@Test
fun queryWithEmptySelectionSet() = runTest {
val id = Arb.dataConnect.id().next(rs)
val queryResult = connector.getFooByIdEmptySelectionSet.execute(id)
queryResult.data shouldBe Unit
}

@Test
fun mutationWithEmptySelectionSet() = runTest {
val id = Arb.dataConnect.id().next(rs)
val barValue = "bar" + Arb.dataConnect.id().next(rs)

val mutationResult = connector.upsertFooEmptySelectionSet.execute(id) { bar = barValue }

withClue("mutationResult.data") { mutationResult.data shouldBe Unit }
val foo = withClue("getFooById") { connector.getFooById.execute(id).data.foo.shouldNotBeNull() }
withClue("foo.bar") { foo.bar shouldBe barValue }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,16 @@ query GetHardcodedFoo
}
}

# This is an example mutation that has an empty selection set (Googlers see b/448629126).
mutation UpsertFooEmptySelectionSet($id: String!, $bar: String) @auth(level: PUBLIC) {
foo_upsert(data: {id: $id, bar: $bar}) @redact
}

# This is an example query that has an empty selection set (Googlers see b/448629126).
query GetFooByIdEmptySelectionSet($id: String!) @auth(level: PUBLIC) {
foo(id: $id) @redact { bar }
}

mutation InsertStringVariants(
$nonNullWithNonEmptyValue: String!,
$nonNullWithEmptyValue: String!,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"defaultVersion": "2.13.0",
"defaultVersion": "2.14.0",
"versions": [
{
"version": "1.3.4",
Expand Down Expand Up @@ -1026,6 +1026,24 @@
"os": "linux",
"size": 29401272,
"sha512DigestHex": "4918eafe8fb23f357e38ddc4e391c93e58261123b97355de2a55bf4cffa358c1442d527b6a7647e0555c73aa91360ee94c1beac64afe0dbeec546d730f7fa201"
},
{
"version": "2.14.0",
"os": "windows",
"size": 30091264,
"sha512DigestHex": "bdd9e6413898039efc6a983bf6f0c2af1600471b6400583847b48626cf2237f458a81eedb10d398fef6675ed44f9918ea05c7bef7787f29806e0f014b1064d33"
},
{
"version": "2.14.0",
"os": "macos",
"size": 29602656,
"sha512DigestHex": "b520daaa2addb3c4591a6644d1ce685acc4b31c6819a04321cb461f535cf4574cdcc12ed02eb74e557a5e6507c02ca58edfb6e35c6b1785cc340f7632334fe25"
},
{
"version": "2.14.0",
"os": "linux",
"size": 29524152,
"sha512DigestHex": "93b319f60ab09dd6a1e9f2e53e4940b6fbcf4a99ab8fe1577c8c7b903b8c9fb5aad4883b6a319d5213b8b3e3fc2188830c34d51aa6c2c36711465012c2f94762"
}
]
}