Skip to content

Commit c91340d

Browse files
authored
update testnet endpoint (#333)
1 parent 0045798 commit c91340d

File tree

23 files changed

+66
-103
lines changed

23 files changed

+66
-103
lines changed

apps/connect/.env.development

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
VITE_HYPERGRAPH_SYNC_SERVER_ORIGIN="http://localhost:3030"
22
VITE_HYPERGRAPH_CHAIN="geo-testnet"
3-
VITE_HYPERGRAPH_API_URL="https://v2-postgraphile.up.railway.app/graphql"
43
VITE_HYPERGRAPH_RPC_URL="https://rpc-geo-test-zc16z3tcvf.t.conduit.xyz"
54
VITE_PRIVY_APP_ID="cmbhnmo1x000bla0mxudtd8z9"
65
VITE_PRIVY_PROVIDERS="development"
76
# VITE_HYPERGRAPH_CHAIN="geogenesis"
8-
# VITE_HYPERGRAPH_API_URL="https://hypergraph-v2.up.railway.app/graphql"
97
# VITE_HYPERGRAPH_RPC_URL="https://rpc-geo-genesis-h0q2s21xx8.t.conduit.xyz"

apps/connect/.env.production

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# VITE_HYPERGRAPH_SYNC_SERVER_ORIGIN="https://syncserver.hypergraph.thegraph.com"
22
VITE_HYPERGRAPH_SYNC_SERVER_ORIGIN="https://hypergraph.fly.dev"
33
VITE_HYPERGRAPH_CHAIN="geo-testnet"
4-
VITE_HYPERGRAPH_API_URL="https://v2-postgraphile.up.railway.app/graphql"
54
VITE_HYPERGRAPH_RPC_URL="https://rpc-geo-test-zc16z3tcvf.t.conduit.xyz"
65
VITE_PRIVY_APP_ID="cmcccikza007bjy0niawgutl0"
76
VITE_PRIVY_PROVIDERS="production"

apps/connect/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"dependencies": {
1717
"@base-ui-components/react": "1.0.0-beta.0",
18-
"@graphprotocol/grc-20": "^0.21.2",
18+
"@graphprotocol/grc-20": "^0.21.6",
1919
"@graphprotocol/hypergraph": "workspace:*",
2020
"@graphprotocol/hypergraph-react": "workspace:*",
2121
"@privy-io/react-auth": "^2.13.0",

apps/connect/src/routes/authenticate.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { SpacesCard } from '@/components/SpacesCard';
33
import { Loading } from '@/components/ui/Loading';
44
import { usePrivateSpaces } from '@/hooks/use-private-spaces';
55
import { usePublicSpaces } from '@/hooks/use-public-spaces';
6+
import { Graph } from '@graphprotocol/grc-20';
67
import { Connect, Identity, Key, type Messages, StoreConnect, Utils } from '@graphprotocol/hypergraph';
78
import { useIdentityToken, usePrivy, useWallets } from '@privy-io/react-auth';
89
import { createFileRoute } from '@tanstack/react-router';
@@ -145,7 +146,7 @@ function AuthenticateComponent() {
145146
isPending: publicSpacesPending,
146147
error: publicSpacesError,
147148
data: publicSpacesData,
148-
} = usePublicSpaces(import.meta.env.VITE_HYPERGRAPH_API_URL);
149+
} = usePublicSpaces(`${Graph.TESTNET_API_ORIGIN}/graphql`);
149150

150151
const selectedPrivateSpaces = new Set<string>();
151152
const selectedPublicSpaces = new Set<string>();

apps/connect/src/routes/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { SpacesCard } from '@/components/SpacesCard';
33
import { Loading } from '@/components/ui/Loading';
44
import { usePrivateSpaces } from '@/hooks/use-private-spaces';
55
import { usePublicSpaces } from '@/hooks/use-public-spaces';
6+
import { Graph } from '@graphprotocol/grc-20';
67
import { useIdentityToken } from '@privy-io/react-auth';
78
import { createFileRoute } from '@tanstack/react-router';
89

@@ -32,7 +33,7 @@ function Authorized() {
3233
isPending: publicSpacesPending,
3334
error: publicSpacesError,
3435
data: publicSpacesData,
35-
} = usePublicSpaces(import.meta.env.VITE_HYPERGRAPH_API_URL);
36+
} = usePublicSpaces(`${Graph.TESTNET_API_ORIGIN}/graphql`);
3637

3738
return (
3839
<div className="flex grow flex-col items-center justify-center">

apps/events/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"preview": "vite preview"
99
},
1010
"dependencies": {
11-
"@graphprotocol/grc-20": "^0.21.2",
11+
"@graphprotocol/grc-20": "^0.21.6",
1212
"@graphprotocol/hypergraph": "workspace:*",
1313
"@graphprotocol/hypergraph-react": "workspace:*",
1414
"@noble/hashes": "^1.8.0",

apps/next-example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"type": "module",
1313
"dependencies": {
14-
"@graphprotocol/grc-20": "^0.21.2",
14+
"@graphprotocol/grc-20": "^0.21.6",
1515
"@graphprotocol/hypergraph": "workspace:*",
1616
"@graphprotocol/hypergraph-react": "workspace:*",
1717
"next": "15.3.2",

apps/typesync/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"@effect/sql": "^0.40.1",
4747
"@effect/sql-sqlite-node": "^0.41.1",
4848
"@effect/vitest": "^0.23.10",
49-
"@graphprotocol/grc-20": "^0.21.3",
49+
"@graphprotocol/grc-20": "^0.21.6",
5050
"@graphql-codegen/cli": "^5.0.7",
5151
"@graphql-codegen/client-preset": "^4.8.3",
5252
"@graphql-codegen/typescript": "^4.1.6",

apps/typesync/src/Database.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const SqlLive = SqliteClient.layer({
1414

1515
const MigratorLive = Migrator.layer({
1616
loader: fromFileSystem(fileURLToPath(new URL('migrations', import.meta.url))),
17-
}).pipe(Layer.provide(SqlLive))
17+
}).pipe(Layer.provide(SqlLive));
1818

1919
const DatabaseLive = Layer.mergeAll(SqlLive, MigratorLive).pipe(Layer.provide(NodeContext.layer));
2020

apps/typesync/src/Utils.ts

Lines changed: 25 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,11 @@ export class InvalidInputError extends Data.TaggedError('/typesync/errors/Invali
130130
/* Windows-safe migration loader */
131131
/* ------------------------------------------------------------------ */
132132

133-
import { pathToFileURL } from "node:url"
134-
import { FileSystem } from "@effect/platform/FileSystem"
135-
import * as Effect from "effect/Effect"
136-
import type { Loader, ResolvedMigration } from "@effect/sql/Migrator"
137-
import { MigrationError } from "@effect/sql/Migrator"
133+
import { pathToFileURL } from 'node:url';
134+
import { FileSystem } from '@effect/platform/FileSystem';
135+
import type { Loader, ResolvedMigration } from '@effect/sql/Migrator';
136+
import { MigrationError } from '@effect/sql/Migrator';
137+
import * as Effect from 'effect/Effect';
138138

139139
/**
140140
* Patched version of
@@ -143,36 +143,29 @@ import { MigrationError } from "@effect/sql/Migrator"
143143
* The only difference is that the dynamic `import()` receives a proper
144144
* `file://` URL, so it works on Windows as well as on Linux / macOS.
145145
*/
146-
export const fromFileSystem = (
147-
dir: string,
148-
): Loader<FileSystem> =>
146+
export const fromFileSystem = (dir: string): Loader<FileSystem> =>
149147
FileSystem.pipe(
150148
/* read directory ----------------------------------------------------- */
151149
Effect.flatMap((FS) => FS.readDirectory(dir)),
152-
Effect.mapError(
153-
(e) => new MigrationError({ reason: "failed", message: e.message }),
154-
),
150+
Effect.mapError((e) => new MigrationError({ reason: 'failed', message: e.message })),
155151
/* build migration list ---------------------------------------------- */
156-
Effect.map((files): ReadonlyArray<ResolvedMigration> =>
157-
files
158-
.flatMap((file) => {
159-
const m =
160-
file.match(/^(?:.*[\\/])?(\d+)_([^.]+)\.(js|ts)$/) // win/posix
161-
if (!m) return []
162-
const [basename, id, name] = m
163-
return [
164-
[
165-
Number(id),
166-
name,
167-
Effect.promise(() =>
168-
import(
169-
/* @vite-ignore */ /* webpackIgnore: true */
170-
pathToFileURL(`${dir}/${basename}`).href,
152+
Effect.map(
153+
(files): ReadonlyArray<ResolvedMigration> =>
154+
files
155+
.flatMap((file) => {
156+
const m = file.match(/^(?:.*[\\/])?(\d+)_([^.]+)\.(js|ts)$/); // win/posix
157+
if (!m) return [];
158+
const [basename, id, name] = m;
159+
return [
160+
[
161+
Number(id),
162+
name,
163+
Effect.promise(
164+
() => import(/* @vite-ignore */ /* webpackIgnore: true */ pathToFileURL(`${dir}/${basename}`).href),
171165
),
172-
),
173-
],
174-
] as const
175-
})
176-
.sort(([a], [b]) => a - b),
166+
],
167+
] as const;
168+
})
169+
.sort(([a], [b]) => a - b),
177170
),
178-
)
171+
);

0 commit comments

Comments
 (0)