Skip to content

Commit

Permalink
chore: rename other account fragments
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarenaldi committed Dec 12, 2024
1 parent f137723 commit 08d93ae
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
8 changes: 4 additions & 4 deletions packages/graphql/src/accounts/account.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { FragmentOf } from 'gql.tada';
import {
AccountAvailable,
AccountBlocked,
AccountAvailableFragment,
AccountBlockedFragment,
AccountFragment,
PaginatedResultInfo,
SelfFundedTransactionRequest,
Expand Down Expand Up @@ -210,7 +210,7 @@ export const AccountsAvailableQuery = graphql(
}
}
}`,
[AccountAvailable, PaginatedResultInfo],
[AccountAvailableFragment, PaginatedResultInfo],
);

export type AccountsAvailableRequest = RequestOf<typeof AccountsAvailableQuery>;
Expand All @@ -226,7 +226,7 @@ export const AccountsBlockedQuery = graphql(
}
}
}`,
[AccountBlocked, PaginatedResultInfo],
[AccountBlockedFragment, PaginatedResultInfo],
);

export type AccountsBlockedRequest = RequestOf<typeof AccountsBlockedQuery>;
Expand Down
4 changes: 2 additions & 2 deletions packages/graphql/src/accounts/managers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { FragmentOf } from 'gql.tada';
import {
AccountManager,
AccountManagerFragment,
PaginatedResultInfo,
SelfFundedTransactionRequest,
SponsoredTransactionRequest,
Expand All @@ -19,7 +19,7 @@ export const AccountManagersQuery = graphql(
}
}
}`,
[AccountManager, PaginatedResultInfo],
[AccountManagerFragment, PaginatedResultInfo],
);

export type AccountManagersRequest = RequestOf<typeof AccountManagersQuery>;
Expand Down
38 changes: 19 additions & 19 deletions packages/graphql/src/fragments/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { FragmentOf } from 'gql.tada';
import { graphql } from '../graphql';
import { Username } from './username';

export const LoggedInAccountOperations = graphql(
export const LoggedInAccountOperationsFragment = graphql(
`fragment LoggedInAccountOperations on LoggedInAccountOperations {
__typename
id
Expand All @@ -18,15 +18,15 @@ export const LoggedInAccountOperations = graphql(
hasReported
}`,
);
export type LoggedInAccountOperations = FragmentOf<typeof LoggedInAccountOperations>;
export type LoggedInAccountOperations = FragmentOf<typeof LoggedInAccountOperationsFragment>;

// TODO fix this
export const AccountMetadata = graphql(
export const AccountMetadataFragment = graphql(
`fragment AccountMetadata on AccountMetadata {
__typename
}`,
);
export type AccountMetadata = FragmentOf<typeof AccountMetadata>;
export type AccountMetadata = FragmentOf<typeof AccountMetadataFragment>;

export const AccountFragment = graphql(
`fragment Account on Account {
Expand All @@ -40,7 +40,7 @@ export const AccountFragment = graphql(
);
export type Account = FragmentOf<typeof AccountFragment>;

export const FullAccount = graphql(
export const FullAccountFragment = graphql(
`fragment Account on Account {
__typename
address
Expand All @@ -55,11 +55,11 @@ export const FullAccount = graphql(
...LoggedInAccountOperations
}
}`,
[AccountMetadata, LoggedInAccountOperations, Username],
[AccountMetadataFragment, LoggedInAccountOperationsFragment, Username],
);
export type FullAccount = FragmentOf<typeof FullAccount>;
export type FullAccount = FragmentOf<typeof FullAccountFragment>;

const AccountManagerPermissions = graphql(
const AccountManagerPermissionsFragment = graphql(
`fragment AccountManagerPermissions on AccountManagerPermissions {
__typename
canExecuteTransactions
Expand All @@ -68,9 +68,9 @@ const AccountManagerPermissions = graphql(
canTransferTokens
}`,
);
export type AccountManagerPermissions = FragmentOf<typeof AccountManagerPermissions>;
export type AccountManagerPermissions = FragmentOf<typeof AccountManagerPermissionsFragment>;

export const AccountManager = graphql(
export const AccountManagerFragment = graphql(
`fragment AccountManager on AccountManager {
__typename
addedAt
Expand All @@ -81,9 +81,9 @@ export const AccountManager = graphql(
}
}`,
);
export type AccountManager = FragmentOf<typeof AccountManager>;
export type AccountManager = FragmentOf<typeof AccountManagerFragment>;

const AccountManaged = graphql(
const AccountManagedFragment = graphql(
`fragment AccountManaged on AccountManaged {
__typename
addedAt
Expand All @@ -94,11 +94,11 @@ const AccountManaged = graphql(
...AccountManagerPermissions
}
}`,
[AccountManagerPermissions, AccountFragment],
[AccountManagerPermissionsFragment, AccountFragment],
);
export type AccountManaged = FragmentOf<typeof AccountManaged>;
export type AccountManaged = FragmentOf<typeof AccountManagedFragment>;

export const AccountAvailable = graphql(
export const AccountAvailableFragment = graphql(
`fragment AccountAvailable on AccountAvailable {
__typename
... on AccountManaged {
Expand All @@ -112,11 +112,11 @@ export const AccountAvailable = graphql(
}
}
}`,
[AccountFragment, AccountManaged],
[AccountFragment, AccountManagedFragment],
);
export type AccountAvailable = FragmentOf<typeof AccountAvailable>;
export type AccountAvailable = FragmentOf<typeof AccountAvailableFragment>;

export const AccountBlocked = graphql(
export const AccountBlockedFragment = graphql(
`fragment AccountBlocked on AccountBlocked {
__typename
blockedAt
Expand All @@ -126,4 +126,4 @@ export const AccountBlocked = graphql(
}`,
[AccountFragment],
);
export type AccountBlocked = FragmentOf<typeof AccountBlocked>;
export type AccountBlocked = FragmentOf<typeof AccountBlockedFragment>;

0 comments on commit 08d93ae

Please sign in to comment.