Skip to content

Commit

Permalink
feat: rename account fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarenaldi committed Dec 12, 2024
1 parent 1e9f2e2 commit 09cc51f
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions packages/graphql/src/accounts/account.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { FragmentOf } from 'gql.tada';
import {
Account,
AccountAvailable,
AccountBlocked,
AccountFragment,
PaginatedResultInfo,
SelfFundedTransactionRequest,
SponsoredTransactionRequest,
Expand All @@ -16,7 +16,7 @@ export const AccountQuery = graphql(
...Account
}
}`,
[Account],
[AccountFragment],
);

export type AccountRequest = RequestOf<typeof AccountQuery>;
Expand All @@ -33,7 +33,7 @@ export const SearchAccountsQuery = graphql(
}
}
}`,
[Account, PaginatedResultInfo],
[AccountFragment, PaginatedResultInfo],
);

export type SearchAccountsRequest = RequestOf<typeof SearchAccountsQuery>;
Expand Down
6 changes: 3 additions & 3 deletions packages/graphql/src/follow.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { FragmentOf } from 'gql.tada';

import {
Account,
AccountFragment,
BooleanValue,
PaginatedResultInfo,
SelfFundedTransactionRequest,
Expand Down Expand Up @@ -97,7 +97,7 @@ const Follower = graphql(
}
followedOn
}`,
[Account],
[AccountFragment],
);
export type Follower = FragmentOf<typeof Follower>;

Expand All @@ -109,7 +109,7 @@ const Following = graphql(
}
followedOn
}`,
[Account],
[AccountFragment],
);
export type Following = FragmentOf<typeof Following>;

Expand Down
10 changes: 5 additions & 5 deletions packages/graphql/src/fragments/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const AccountMetadata = graphql(
);
export type AccountMetadata = FragmentOf<typeof AccountMetadata>;

export const Account = graphql(
export const AccountFragment = graphql(
`fragment Account on Account {
__typename
address
Expand All @@ -38,7 +38,7 @@ export const Account = graphql(
}`,
[Username],
);
export type Account = FragmentOf<typeof Account>;
export type Account = FragmentOf<typeof AccountFragment>;

export const FullAccount = graphql(
`fragment Account on Account {
Expand Down Expand Up @@ -94,7 +94,7 @@ const AccountManaged = graphql(
...AccountManagerPermissions
}
}`,
[AccountManagerPermissions, Account],
[AccountManagerPermissions, AccountFragment],
);
export type AccountManaged = FragmentOf<typeof AccountManaged>;

Expand All @@ -112,7 +112,7 @@ export const AccountAvailable = graphql(
}
}
}`,
[Account, AccountManaged],
[AccountFragment, AccountManaged],
);
export type AccountAvailable = FragmentOf<typeof AccountAvailable>;

Expand All @@ -124,6 +124,6 @@ export const AccountBlocked = graphql(
...Account
}
}`,
[Account],
[AccountFragment],
);
export type AccountBlocked = FragmentOf<typeof AccountBlocked>;
8 changes: 4 additions & 4 deletions packages/graphql/src/fragments/post.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { FragmentOf } from 'gql.tada';
import { graphql } from '../graphql';
import { Account } from './account';
import { AccountFragment } from './account';
import { ActionInputInfo, Amount, BooleanValue, NetworkAddress } from './common';
import { App, Feed } from './primitives';

Expand Down Expand Up @@ -134,7 +134,7 @@ export const ReferencedPost = graphql(
}
}
`,
[Account, App, Feed, PostMetadata, PostAction, LoggedInPostOperations],
[AccountFragment, App, Feed, PostMetadata, PostAction, LoggedInPostOperations],
);

export const NestedPost = graphql(
Expand Down Expand Up @@ -184,7 +184,7 @@ export const Post = graphql(
}
}
`,
[Account, App, Feed, PostMetadata, PostAction, NestedPost, LoggedInPostOperations],
[AccountFragment, App, Feed, PostMetadata, PostAction, NestedPost, LoggedInPostOperations],
);
export type Post = FragmentOf<typeof Post>;

Expand Down Expand Up @@ -277,6 +277,6 @@ export const AccountPostReaction = graphql(
...PostReaction
}
}`,
[Account, PostReaction],
[AccountFragment, PostReaction],
);
export type AccountPostReaction = FragmentOf<typeof AccountPostReaction>;
8 changes: 4 additions & 4 deletions packages/graphql/src/notifications.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { FragmentOf } from 'gql.tada';
import { Account, PaginatedResultInfo, Post } from './fragments';
import { AccountFragment, PaginatedResultInfo, Post } from './fragments';
import { type RequestOf, graphql } from './graphql';

const FollowNotification = graphql(
Expand All @@ -13,7 +13,7 @@ const FollowNotification = graphql(
followedAt
}
}`,
[Account],
[AccountFragment],
);
export type FollowNotification = FragmentOf<typeof FollowNotification>;

Expand All @@ -34,7 +34,7 @@ const ReactionNotification = graphql(
...Post
}
}`,
[Account, Post],
[AccountFragment, Post],
);
export type ReactionNotification = FragmentOf<typeof ReactionNotification>;

Expand Down Expand Up @@ -65,7 +65,7 @@ const RepostNotification = graphql(
...Post
}
}`,
[Account],
[AccountFragment],
);
export type RepostNotification = FragmentOf<typeof RepostNotification>;

Expand Down

0 comments on commit 09cc51f

Please sign in to comment.