chore: use IDs instead of Strings in graphql queries (#2961)
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
query GetCollectionChildren($collectionID: ID!, $cursor: String) {
|
query GetCollectionChildren($collectionID: ID!, $cursor: ID) {
|
||||||
collection(collectionID: $collectionID) {
|
collection(collectionID: $collectionID) {
|
||||||
children(cursor: $cursor) {
|
children(cursor: $cursor) {
|
||||||
id
|
id
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
query GetCollectionChildrenIDs($collectionID: ID!, $cursor: String) {
|
query GetCollectionChildrenIDs($collectionID: ID!, $cursor: ID) {
|
||||||
collection(collectionID: $collectionID) {
|
collection(collectionID: $collectionID) {
|
||||||
children(cursor: $cursor) {
|
children(cursor: $cursor) {
|
||||||
id
|
id
|
||||||
|
|||||||
26
packages/hoppscotch-web/src/firebase/init.ts
Normal file
26
packages/hoppscotch-web/src/firebase/init.ts
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
import { initializeApp } from "firebase/app"
|
||||||
|
|
||||||
|
const firebaseConfig = {
|
||||||
|
apiKey: import.meta.env.VITE_API_KEY,
|
||||||
|
authDomain: import.meta.env.VITE_AUTH_DOMAIN,
|
||||||
|
databaseURL: import.meta.env.VITE_DATABASE_URL,
|
||||||
|
projectId: import.meta.env.VITE_PROJECT_ID,
|
||||||
|
storageBucket: import.meta.env.VITE_STORAGE_BUCKET,
|
||||||
|
messagingSenderId: import.meta.env.VITE_MESSAGING_SENDER_ID,
|
||||||
|
appId: import.meta.env.VITE_APP_ID,
|
||||||
|
measurementId: import.meta.env.VITE_MEASUREMENT_ID,
|
||||||
|
}
|
||||||
|
|
||||||
|
let initialized = false
|
||||||
|
|
||||||
|
export function initializeFirebase() {
|
||||||
|
if (!initialized) {
|
||||||
|
try {
|
||||||
|
initializeApp(firebaseConfig)
|
||||||
|
initialized = true
|
||||||
|
} catch (e) {
|
||||||
|
// initializeApp throws exception if we reinitialize
|
||||||
|
initialized = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
import { createHoppApp } from "@hoppscotch/common"
|
import { createHoppApp } from "@hoppscotch/common"
|
||||||
|
import { initializeFirebase } from "./firebase/init"
|
||||||
import { def as authDef } from "./firebase/auth"
|
import { def as authDef } from "./firebase/auth"
|
||||||
import { def as envDef } from "./environments"
|
import { def as envDef } from "./environments"
|
||||||
import { def as collectionsDef } from "./collections"
|
import { def as collectionsDef } from "./collections"
|
||||||
@@ -7,6 +8,8 @@ import { def as historyDef } from "./history"
|
|||||||
import { def as tabStateDef } from "./tab"
|
import { def as tabStateDef } from "./tab"
|
||||||
import { def as analyticsDef } from "./analytics"
|
import { def as analyticsDef } from "./analytics"
|
||||||
|
|
||||||
|
initializeFirebase()
|
||||||
|
|
||||||
createHoppApp("#app", {
|
createHoppApp("#app", {
|
||||||
auth: authDef,
|
auth: authDef,
|
||||||
analytics: analyticsDef,
|
analytics: analyticsDef,
|
||||||
|
|||||||
Reference in New Issue
Block a user