Skip to content

Commit 79356f2

Browse files
committed
use new graphql endpoint
1 parent aededee commit 79356f2

16 files changed

Lines changed: 27 additions & 22 deletions

File tree

apps/connect/src/routes/authenticate.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import { usePublicSpaces } from '@/hooks/use-public-spaces';
1818
const CHAIN = import.meta.env.VITE_HYPERGRAPH_CHAIN === 'geogenesis' ? Connect.GEOGENESIS : Connect.GEO_TESTNET;
1919
const API_URL =
2020
import.meta.env.VITE_HYPERGRAPH_CHAIN === 'geogenesis'
21-
? `${Graph.MAINNET_API_ORIGIN}/graphql`
22-
: `${Graph.TESTNET_API_ORIGIN}/graphql`;
21+
? `${Graph.MAINNET_API_ORIGIN}/v2/graphql`
22+
: `${Graph.TESTNET_API_ORIGIN}/v2/graphql`;
2323

2424
type AuthenticateSearch = {
2525
data: unknown;

apps/connect/src/routes/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function Authorized() {
3333
isPending: publicSpacesPending,
3434
error: publicSpacesError,
3535
data: publicSpacesData,
36-
} = usePublicSpaces(`${Graph.TESTNET_API_ORIGIN}/graphql`);
36+
} = usePublicSpaces(`${Graph.TESTNET_API_ORIGIN}/v2/graphql`);
3737

3838
return (
3939
<div className="flex grow flex-col items-center justify-center">

apps/events/src/routes/podcasts.lazy.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,7 @@ function RouteComponent() {
107107
cover: {
108108
exists: true,
109109
},
110-
or: [
111-
{ id: { is: '01d162e26d644acbb0a6be94169b8746' } },
112-
{ id: { is: '0cd771065e1e478496dae4d191861081' } },
113-
],
110+
or: [{ id: { is: '01d162e26d644acbb0a6be94169b8746' } }, { id: { is: '0cd771065e1e478496dae4d191861081' } }],
114111
},
115112
include: {
116113
cover: {},

docs/docs/spaces.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Public spaces can be found at [Geo Browser](https://www.geobrowser.io/root), whe
1414

1515
Indexer API that indexes all the public spaces and the content in it!
1616

17-
[Railway Graphql API](https://api-testnet.geobrowser.io/graphql)
17+
[Railway Graphql API](https://api-testnet.geobrowser.io/v2/graphql)
1818

1919
## Private Spaces
2020

packages/hypergraph-react/src/hooks/use-spaces.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const useSpaces = (params: { mode: 'public' | 'private' }) => {
3838
queryKey: ['hypergraph-public-spaces', params.mode],
3939
queryFn: async () => {
4040
const result = await request<PublicSpacesQueryResult>(
41-
`${Graph.TESTNET_API_ORIGIN}/graphql`,
41+
`${Graph.TESTNET_API_ORIGIN}/v2/graphql`,
4242
publicSpacesQueryDocument,
4343
{
4444
accountAddress,

packages/hypergraph-react/src/internal/generate-delete-ops.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,13 @@ type DeleteEntityResult = {
4444
};
4545

4646
export const generateDeleteOps = async ({ id }: { id: string; space: string }) => {
47-
const result = await request<DeleteEntityResult>(`${Graph.TESTNET_API_ORIGIN}/graphql`, deleteEntityQueryDocument, {
48-
entityId: id,
49-
});
47+
const result = await request<DeleteEntityResult>(
48+
`${Graph.TESTNET_API_ORIGIN}/v2/graphql`,
49+
deleteEntityQueryDocument,
50+
{
51+
entityId: id,
52+
},
53+
);
5054
if (result.entity === null) {
5155
throw new Error('Entity not found');
5256
}

packages/hypergraph-react/src/internal/use-delete-entity-public.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export const useDeleteEntityPublic = <S extends Schema.Schema.AnyNoContext>(
4545
return async ({ id, walletClient }: { id: string; walletClient: Connect.SmartSessionClient }) => {
4646
try {
4747
const result = await request<EntityToDeleteQueryResult>(
48-
`${Graph.TESTNET_API_ORIGIN}/graphql`,
48+
`${Graph.TESTNET_API_ORIGIN}/v2/graphql`,
4949
deleteEntityQueryDocument,
5050
{
5151
spaceId: space,

packages/hypergraph-react/src/internal/use-public-space.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const usePublicSpace = ({ spaceId, enabled }: { spaceId: string; enabled:
2424
const result = useQuery({
2525
queryKey: ['hypergraph-public-space', spaceId],
2626
queryFn: async () => {
27-
const result = await request<SpaceQueryResult>(`${Graph.TESTNET_API_ORIGIN}/graphql`, spaceQueryDocument, {
27+
const result = await request<SpaceQueryResult>(`${Graph.TESTNET_API_ORIGIN}/v2/graphql`, spaceQueryDocument, {
2828
spaceId,
2929
});
3030
return result?.space?.page

packages/hypergraph-react/src/prepare-publish.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const preparePublish = async <S extends Schema.Schema.AnyNoContext>({
4949
publicSpace,
5050
}: PreparePublishParams<S>) => {
5151
const data = await request<EntityToPublishQueryResult>(
52-
`${Graph.TESTNET_API_ORIGIN}/graphql`,
52+
`${Graph.TESTNET_API_ORIGIN}/v2/graphql`,
5353
entityToPublishQueryDocument,
5454
{
5555
entityId: entity.id,

packages/hypergraph-react/test/prepare-publish.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ describe('preparePublish', () => {
133133

134134
const result = await preparePublish(params);
135135

136-
expect(mockRequest).toHaveBeenCalledWith(`${Graph.TESTNET_API_ORIGIN}/graphql`, expect.any(String), {
136+
expect(mockRequest).toHaveBeenCalledWith(`${Graph.TESTNET_API_ORIGIN}/v2/graphql`, expect.any(String), {
137137
entityId: entity.id,
138138
spaceId: publicSpaceId,
139139
});

0 commit comments

Comments
 (0)