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
29 changes: 29 additions & 0 deletions apps/events/src/mapping.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { Id } from '@graphprotocol/grc-20';
import type { Mapping } from '@graphprotocol/hypergraph-react';

export const mapping: Mapping = {
NewsStory: {
typeIds: [Id.Id('VKPGYGnFuaoAASiAukCVCX')],
properties: {
name: Id.Id('LuBWqZAu6pz54eiJS5mLv8'),
publishDate: Id.Id('KPNjGaLx5dKofVhT6Dfw22'),
description: Id.Id('LA1DqP5v6QAdsgLPXGF3YA'),
},
},
Todo2: {
typeIds: [Id.Id('4ewpH1mPW9f2tLhaHdKKyn')],
properties: {
name: Id.Id('LuBWqZAu6pz54eiJS5mLv8'),
checked: Id.Id('7zyFtwuuf9evFNZqcLSytU'),
},
relations: {
assignees: Id.Id('GeLe54zpz1MiMWAF8LFCCt'),
},
},
User: {
typeIds: [Id.Id('KYCunro75we8KbjpsDKbm7')],
properties: {
name: Id.Id('LuBWqZAu6pz54eiJS5mLv8'),
},
},
};
2 changes: 1 addition & 1 deletion apps/events/src/routes/playground.lazy.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Playground } from '@/components/playground';
import { mapping } from '@/mapping.js';
import { HypergraphSpaceProvider } from '@graphprotocol/hypergraph-react';
import { createLazyFileRoute } from '@tanstack/react-router';
import { mapping } from '../schema';

export const Route = createLazyFileRoute('/playground')({
component: RouteComponent,
Expand Down
2 changes: 1 addition & 1 deletion apps/events/src/routes/space/$spaceId/chat.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SpaceChat } from '@/components/SpaceChat';
import { mapping } from '@/schema';
import { mapping } from '@/mapping.js';
import { store } from '@graphprotocol/hypergraph';
import { HypergraphSpaceProvider, useHypergraphApp } from '@graphprotocol/hypergraph-react';
import { createFileRoute } from '@tanstack/react-router';
Expand Down
2 changes: 1 addition & 1 deletion apps/events/src/routes/space/$spaceId/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { TodosReadOnlyFilter } from '@/components/todos-read-only-filter';
import { Button } from '@/components/ui/button';
import { Users } from '@/components/users';
import { availableAccounts } from '@/lib/availableAccounts';
import { mapping } from '@/schema';
import { mapping } from '@/mapping.js';
import { store } from '@graphprotocol/hypergraph';
import { HypergraphSpaceProvider, useHypergraphApp } from '@graphprotocol/hypergraph-react';
import { createFileRoute } from '@tanstack/react-router';
Expand Down
2 changes: 1 addition & 1 deletion apps/events/src/routes/space/$spaceId/playground.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TodosPublicGeo } from '@/components/todo/todos-public-geo';
import { mapping } from '@/schema';
import { mapping } from '@/mapping.js';
import { store } from '@graphprotocol/hypergraph';
import { HypergraphSpaceProvider, useHypergraphApp } from '@graphprotocol/hypergraph-react';
import { createFileRoute } from '@tanstack/react-router';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CreatePropertiesAndTypes } from '@/components/create-properties-and-types';
import { Todos2 } from '@/components/todos2';
import { mapping } from '@/schema';
import { mapping } from '@/mapping.js';
import { store } from '@graphprotocol/hypergraph';
import { HypergraphSpaceProvider, useHypergraphApp } from '@graphprotocol/hypergraph-react';
import { createFileRoute } from '@tanstack/react-router';
Expand Down
2 changes: 1 addition & 1 deletion apps/events/src/routes/space/$spaceId/users.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { UsersMerged } from '@/components/users/users-merged';
import { UsersPublicGeo } from '@/components/users/users-public-geo';
import { mapping } from '@/schema';
import { mapping } from '@/mapping.js';
import { store } from '@graphprotocol/hypergraph';
import { HypergraphSpaceProvider, useHypergraphApp } from '@graphprotocol/hypergraph-react';
import { createFileRoute } from '@tanstack/react-router';
Expand Down
29 changes: 0 additions & 29 deletions apps/events/src/schema.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { Id } from '@graphprotocol/grc-20';
import { Entity } from '@graphprotocol/hypergraph';
import type { Mapping } from '@graphprotocol/hypergraph-react';

export class User extends Entity.Class<User>('User')({
name: Entity.Text,
Expand All @@ -23,30 +21,3 @@ export class NewsStory extends Entity.Class<NewsStory>('NewsStory')({
description: Entity.Text,
publishDate: Entity.Text,
}) {}

export const mapping: Mapping = {
NewsStory: {
typeIds: [Id.Id('VKPGYGnFuaoAASiAukCVCX')],
properties: {
name: Id.Id('LuBWqZAu6pz54eiJS5mLv8'),
publishDate: Id.Id('KPNjGaLx5dKofVhT6Dfw22'),
description: Id.Id('LA1DqP5v6QAdsgLPXGF3YA'),
},
},
Todo2: {
typeIds: [Id.Id('4ewpH1mPW9f2tLhaHdKKyn')],
properties: {
name: Id.Id('LuBWqZAu6pz54eiJS5mLv8'),
checked: Id.Id('7zyFtwuuf9evFNZqcLSytU'),
},
relations: {
assignees: Id.Id('GeLe54zpz1MiMWAF8LFCCt'),
},
},
User: {
typeIds: [Id.Id('KYCunro75we8KbjpsDKbm7')],
properties: {
name: Id.Id('LuBWqZAu6pz54eiJS5mLv8'),
},
},
};
Loading