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
7 changes: 7 additions & 0 deletions apps/connect/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# connect

## 0.1.1
### Patch Changes

- Updated dependencies [8622688]
- @graphprotocol/hypergraph-react@1.0.0
- @graphprotocol/hypergraph@0.2.0

## 0.1.0
### Patch Changes

Expand Down
2 changes: 1 addition & 1 deletion apps/connect/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "connect",
"private": true,
"version": "0.1.0",
"version": "0.1.1",
"type": "module",
"scripts": {
"dev": "vite --force",
Expand Down
1 change: 0 additions & 1 deletion apps/events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"@graphprotocol/grc-20": "^0.21.6",
"@graphprotocol/hypergraph": "workspace:*",
"@graphprotocol/hypergraph-react": "workspace:*",
"@graphprotocol/typesync": "workspace:*",
"@noble/hashes": "^1.8.0",
"@radix-ui/react-avatar": "^1.1.9",
"@radix-ui/react-icons": "^1.3.2",
Expand Down
4 changes: 2 additions & 2 deletions apps/events/src/mapping.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Id } from '@graphprotocol/grc-20';
import type { Mapping } from '@graphprotocol/typesync/Mapping';
import type { Mapping } from '@graphprotocol/hypergraph';

export const mapping: Mapping = {
export const mapping: Mapping.Mapping = {
Event: {
typeIds: [Id.Id('7f9562d4-034d-4385-bf5c-f02cdebba47a')],
properties: {
Expand Down
6 changes: 6 additions & 0 deletions apps/server/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# server

## 0.1.1
### Patch Changes

- Updated dependencies [8622688]
- @graphprotocol/hypergraph@0.2.0

## 0.1.0
### Patch Changes

Expand Down
2 changes: 1 addition & 1 deletion apps/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "server",
"version": "0.1.0",
"version": "0.1.1",
"private": true,
"type": "module",
"scripts": {
Expand Down
25 changes: 25 additions & 0 deletions packages/hypergraph-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# @graphprotocol/hypergraph-react

## 1.0.0
### Minor Changes

- 8622688: Move @graphprotocol/typesync Mapping and Utils into @graphprotocol/hypergraph package and export from there. Update @graphprotocol/hypergraph-react to use mapping from @graphprotocol/hypergraph.


## Changes needed

Any use of `@graphprotocol/typesync` should use the exported mapping and utils from `@graphprotocol/hypergraph` instead.

### Example

```ts
// before
import type { Mapping } from '@graphprotocol/typesync/Mapping'

// after
import type { Mapping } from '@graphprotocol/hypergraph/mapping'
```

### Patch Changes

- Updated dependencies [8622688]
- @graphprotocol/hypergraph@0.2.0

## 0.1.0
### Patch Changes

Expand Down
4 changes: 1 addition & 3 deletions packages/hypergraph-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphprotocol/hypergraph-react",
"version": "0.1.0",
"version": "1.0.0",
"description": "React implementation and additional functionality, components, and hooks for the hypergraph SDK framework",
"keywords": [
"Web3",
Expand Down Expand Up @@ -31,12 +31,10 @@
},
"peerDependencies": {
"@graphprotocol/hypergraph": "workspace:*",
"@graphprotocol/typesync": "workspace:*",
"react": "^18.0.0 || ^19.0.0"
},
"devDependencies": {
"@graphprotocol/hypergraph": "workspace:*",
"@graphprotocol/typesync": "workspace:*",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.3.0",
"@types/react": "^19.1.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/hypergraph-react/src/HypergraphAppContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ import {
Inboxes,
type InboxMessageStorageEntry,
Key,
type Mapping,
Messages,
SpaceEvents,
type SpaceStorageEntry,
store,
Utils,
} from '@graphprotocol/hypergraph';
import type { Mapping } from '@graphprotocol/typesync/Mapping';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { useSelector as useSelectorStore } from '@xstate/store/react';
import { Effect, Exit } from 'effect';
Expand Down Expand Up @@ -219,7 +219,7 @@ export type HypergraphAppProviderProps = Readonly<{
syncServerUri?: string;
chainId?: number;
children: ReactNode;
mapping: Mapping;
mapping: Mapping.Mapping;
appId: string;
}>;

Expand Down
11 changes: 5 additions & 6 deletions packages/hypergraph-react/src/internal/use-query-public.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Graph } from '@graphprotocol/grc-20';
import { type Entity, store, Type } from '@graphprotocol/hypergraph';
import type { Mapping, MappingEntry } from '@graphprotocol/typesync/Mapping';
import { type Entity, type Mapping, store, Type } from '@graphprotocol/hypergraph';
import { useQuery as useQueryTanstack } from '@tanstack/react-query';
import { useSelector } from '@xstate/store/react';
import * as Either from 'effect/Either';
Expand Down Expand Up @@ -172,8 +171,8 @@ const convertPropertyValue = (
const convertRelations = <S extends Entity.AnyNoContext>(
queryEntity: RecursiveQueryEntity,
type: S,
mappingEntry: MappingEntry,
mapping: Mapping,
mappingEntry: Mapping.MappingEntry,
mapping: Mapping.Mapping,
) => {
const rawEntity: Record<string, string | boolean | number | unknown[] | Date> = {};

Expand Down Expand Up @@ -251,8 +250,8 @@ const convertRelations = <S extends Entity.AnyNoContext>(
export const parseResult = <S extends Entity.AnyNoContext>(
queryData: EntityQueryResult,
type: S,
mappingEntry: MappingEntry,
mapping: Mapping,
mappingEntry: Mapping.MappingEntry,
mapping: Mapping.Mapping,
) => {
const decode = Schema.decodeUnknownEither(type);
const data: Entity.Entity<S>[] = [];
Expand Down
20 changes: 20 additions & 0 deletions packages/hypergraph/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# @graphprotocol/hypergraph

## 0.2.0
### Minor Changes

- 8622688: Move @graphprotocol/typesync Mapping and Utils into @graphprotocol/hypergraph package and export from there. Update @graphprotocol/hypergraph-react to use mapping from @graphprotocol/hypergraph.


## Changes needed

Any use of `@graphprotocol/typesync` should use the exported mapping and utils from `@graphprotocol/hypergraph` instead.

### Example

```ts
// before
import type { Mapping } from '@graphprotocol/typesync/Mapping'

// after
import type { Mapping } from '@graphprotocol/hypergraph/mapping'
```

## 0.1.0
### Patch Changes

Expand Down
7 changes: 2 additions & 5 deletions packages/hypergraph/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphprotocol/hypergraph",
"version": "0.1.0",
"version": "0.2.0",
"description": "SDK for building performant, type-safe, local-first dapps on top of The Graph ecosystem knowledge graphs.",
"publishConfig": {
"access": "public",
Expand All @@ -26,6 +26,7 @@
"./identity": "./dist/identity/index.js",
"./inboxes": "./dist/inboxes/index.js",
"./key": "./dist/key/index.js",
"./mapping": "./dist/mapping/index.js",
"./messages": "./dist/messages/index.js",
"./space-events": "./dist/space-events/index.js",
"./space-info": "./dist/space-info/index.js",
Expand All @@ -38,11 +39,7 @@
"build": "tsc -b --force tsconfig.build.json && babel dist --plugins annotate-pure-calls --out-dir dist --source-maps && node ../../scripts/package.mjs",
"test": "vitest"
},
"peerDependencies": {
"@graphprotocol/typesync": "workspace:*"
},
"devDependencies": {
"@graphprotocol/typesync": "workspace:*",
"@types/uuid": "^10.0.0"
},
"dependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/hypergraph/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export * as Entity from './entity/index.js';
export * as Identity from './identity/index.js';
export * as Inboxes from './inboxes/index.js';
export * as Key from './key/index.js';
export * as Mapping from './mapping/index.js';
export * as Messages from './messages/index.js';
export * as SpaceEvents from './space-events/index.js';
export * as SpaceInfo from './space-info/index.js';
Expand Down
Loading
Loading