From 08d93ae0d57204c2b94ab3aba68d3fa424af0ccb Mon Sep 17 00:00:00 2001 From: Cesare Naldi Date: Thu, 12 Dec 2024 17:45:14 +0100 Subject: [PATCH] chore: rename other account fragments --- packages/graphql/src/accounts/account.ts | 8 ++--- packages/graphql/src/accounts/managers.ts | 4 +-- packages/graphql/src/fragments/account.ts | 38 +++++++++++------------ 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/packages/graphql/src/accounts/account.ts b/packages/graphql/src/accounts/account.ts index dc37924af..d58188dd4 100644 --- a/packages/graphql/src/accounts/account.ts +++ b/packages/graphql/src/accounts/account.ts @@ -1,7 +1,7 @@ import type { FragmentOf } from 'gql.tada'; import { - AccountAvailable, - AccountBlocked, + AccountAvailableFragment, + AccountBlockedFragment, AccountFragment, PaginatedResultInfo, SelfFundedTransactionRequest, @@ -210,7 +210,7 @@ export const AccountsAvailableQuery = graphql( } } }`, - [AccountAvailable, PaginatedResultInfo], + [AccountAvailableFragment, PaginatedResultInfo], ); export type AccountsAvailableRequest = RequestOf; @@ -226,7 +226,7 @@ export const AccountsBlockedQuery = graphql( } } }`, - [AccountBlocked, PaginatedResultInfo], + [AccountBlockedFragment, PaginatedResultInfo], ); export type AccountsBlockedRequest = RequestOf; diff --git a/packages/graphql/src/accounts/managers.ts b/packages/graphql/src/accounts/managers.ts index 319ad1bdc..348011df1 100644 --- a/packages/graphql/src/accounts/managers.ts +++ b/packages/graphql/src/accounts/managers.ts @@ -1,6 +1,6 @@ import type { FragmentOf } from 'gql.tada'; import { - AccountManager, + AccountManagerFragment, PaginatedResultInfo, SelfFundedTransactionRequest, SponsoredTransactionRequest, @@ -19,7 +19,7 @@ export const AccountManagersQuery = graphql( } } }`, - [AccountManager, PaginatedResultInfo], + [AccountManagerFragment, PaginatedResultInfo], ); export type AccountManagersRequest = RequestOf; diff --git a/packages/graphql/src/fragments/account.ts b/packages/graphql/src/fragments/account.ts index 55a829632..e520d302e 100644 --- a/packages/graphql/src/fragments/account.ts +++ b/packages/graphql/src/fragments/account.ts @@ -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 @@ -18,15 +18,15 @@ export const LoggedInAccountOperations = graphql( hasReported }`, ); -export type LoggedInAccountOperations = FragmentOf; +export type LoggedInAccountOperations = FragmentOf; // TODO fix this -export const AccountMetadata = graphql( +export const AccountMetadataFragment = graphql( `fragment AccountMetadata on AccountMetadata { __typename }`, ); -export type AccountMetadata = FragmentOf; +export type AccountMetadata = FragmentOf; export const AccountFragment = graphql( `fragment Account on Account { @@ -40,7 +40,7 @@ export const AccountFragment = graphql( ); export type Account = FragmentOf; -export const FullAccount = graphql( +export const FullAccountFragment = graphql( `fragment Account on Account { __typename address @@ -55,11 +55,11 @@ export const FullAccount = graphql( ...LoggedInAccountOperations } }`, - [AccountMetadata, LoggedInAccountOperations, Username], + [AccountMetadataFragment, LoggedInAccountOperationsFragment, Username], ); -export type FullAccount = FragmentOf; +export type FullAccount = FragmentOf; -const AccountManagerPermissions = graphql( +const AccountManagerPermissionsFragment = graphql( `fragment AccountManagerPermissions on AccountManagerPermissions { __typename canExecuteTransactions @@ -68,9 +68,9 @@ const AccountManagerPermissions = graphql( canTransferTokens }`, ); -export type AccountManagerPermissions = FragmentOf; +export type AccountManagerPermissions = FragmentOf; -export const AccountManager = graphql( +export const AccountManagerFragment = graphql( `fragment AccountManager on AccountManager { __typename addedAt @@ -81,9 +81,9 @@ export const AccountManager = graphql( } }`, ); -export type AccountManager = FragmentOf; +export type AccountManager = FragmentOf; -const AccountManaged = graphql( +const AccountManagedFragment = graphql( `fragment AccountManaged on AccountManaged { __typename addedAt @@ -94,11 +94,11 @@ const AccountManaged = graphql( ...AccountManagerPermissions } }`, - [AccountManagerPermissions, AccountFragment], + [AccountManagerPermissionsFragment, AccountFragment], ); -export type AccountManaged = FragmentOf; +export type AccountManaged = FragmentOf; -export const AccountAvailable = graphql( +export const AccountAvailableFragment = graphql( `fragment AccountAvailable on AccountAvailable { __typename ... on AccountManaged { @@ -112,11 +112,11 @@ export const AccountAvailable = graphql( } } }`, - [AccountFragment, AccountManaged], + [AccountFragment, AccountManagedFragment], ); -export type AccountAvailable = FragmentOf; +export type AccountAvailable = FragmentOf; -export const AccountBlocked = graphql( +export const AccountBlockedFragment = graphql( `fragment AccountBlocked on AccountBlocked { __typename blockedAt @@ -126,4 +126,4 @@ export const AccountBlocked = graphql( }`, [AccountFragment], ); -export type AccountBlocked = FragmentOf; +export type AccountBlocked = FragmentOf;