Skip to content

Commit

Permalink
chore: renames App, Admins, and Auth related fragments
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarenaldi committed Dec 16, 2024
1 parent 620864b commit 184c508
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 74 deletions.
12 changes: 6 additions & 6 deletions packages/graphql/src/admins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from './fragments';
import { type RequestOf, graphql } from './graphql';

const AddAdminsResult = graphql(
const AddAdminsResultFragment = graphql(
`fragment AddAdminsResult on AddAdminsResult {
...on SponsoredTransactionRequest {
...SponsoredTransactionRequest
Expand All @@ -25,19 +25,19 @@ const AddAdminsResult = graphql(
TransactionWillFailFragment,
],
);
export type AddAdminsResult = FragmentOf<typeof AddAdminsResult>;
export type AddAdminsResult = FragmentOf<typeof AddAdminsResultFragment>;

export const AddAdminsMutation = graphql(
`mutation AddAdmins($request: AddAdminsRequest!) {
value: addAdmins(request: $request) {
...AddAdminsResult
}
}`,
[AddAdminsResult],
[AddAdminsResultFragment],
);
export type AddAdminsRequest = RequestOf<typeof AddAdminsMutation>;

const RemoveAdminsResult = graphql(
const RemoveAdminsResultFragment = graphql(
`fragment RemoveAdminsResult on RemoveAdminsResult {
...on SponsoredTransactionRequest {
...SponsoredTransactionRequest
Expand All @@ -55,15 +55,15 @@ const RemoveAdminsResult = graphql(
TransactionWillFailFragment,
],
);
export type RemoveAdminsResult = FragmentOf<typeof RemoveAdminsResult>;
export type RemoveAdminsResult = FragmentOf<typeof RemoveAdminsResultFragment>;

export const RemoveAdminsMutation = graphql(
`mutation RemoveAdmins($request: RemoveAdminsRequest!) {
value: removeAdmins(request: $request) {
...RemoveAdminsResult
}
}`,
[RemoveAdminsResult],
[RemoveAdminsResultFragment],
);
export type RemoveAdminsRequest = RequestOf<typeof RemoveAdminsMutation>;

Expand Down
86 changes: 44 additions & 42 deletions packages/graphql/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ export const AppQuery = graphql(
);
export type AppRequest = RequestOf<typeof AppQuery>;

const CreateAppResponse = graphql(
const CreateAppResponseFragment = graphql(
`fragment CreateAppResponse on CreateAppResponse {
__typename
hash
}`,
);
export type CreateAppResponse = FragmentOf<typeof CreateAppResponse>;
export type CreateAppResponse = FragmentOf<typeof CreateAppResponseFragment>;

const CreateAppResult = graphql(
const CreateAppResultFragment = graphql(
`fragment CreateAppResult on CreateAppResult {
...on CreateAppResponse {
...CreateAppResponse
Expand All @@ -37,21 +37,21 @@ const CreateAppResult = graphql(
...TransactionWillFail
}
}`,
[CreateAppResponse, SelfFundedTransactionRequestFragment, TransactionWillFailFragment],
[CreateAppResponseFragment, SelfFundedTransactionRequestFragment, TransactionWillFailFragment],
);
export type CreateAppResult = FragmentOf<typeof CreateAppResult>;
export type CreateAppResult = FragmentOf<typeof CreateAppResultFragment>;

export const CreateAppMutation = graphql(
`mutation CreateApp($request: CreateAppRequest!) {
value: createApp(request: $request) {
...CreateAppResult
}
}`,
[CreateAppResult],
[CreateAppResultFragment],
);
export type CreateAppRequest = RequestOf<typeof CreateAppMutation>;

const AddAppFeedsResult = graphql(
const AddAppFeedsResultFragment = graphql(
`fragment AddAppFeedsResult on AddAppFeedsResult {
...on SponsoredTransactionRequest {
...SponsoredTransactionRequest
Expand All @@ -69,19 +69,19 @@ const AddAppFeedsResult = graphql(
TransactionWillFailFragment,
],
);
export type AddAppFeedsResult = FragmentOf<typeof AddAppFeedsResult>;
export type AddAppFeedsResult = FragmentOf<typeof AddAppFeedsResultFragment>;

export const AddAppFeedsMutation = graphql(
`mutation AddAppFeeds($request: AddAppFeedsRequest!) {
value: addAppFeeds(request: $request) {
...AddAppFeedsResult
}
}`,
[AddAppFeedsResult],
[AddAppFeedsResultFragment],
);
export type AddAppFeedsRequest = RequestOf<typeof AddAppFeedsMutation>;

const AddAppGroupsResult = graphql(
const AddAppGroupsResultFragment = graphql(
`fragment AddAppGroupsResult on AddAppGroupsResult {
...on SponsoredTransactionRequest {
...SponsoredTransactionRequest
Expand All @@ -99,19 +99,19 @@ const AddAppGroupsResult = graphql(
TransactionWillFailFragment,
],
);
export type AddAppGroupsResult = FragmentOf<typeof AddAppGroupsResult>;
export type AddAppGroupsResult = FragmentOf<typeof AddAppGroupsResultFragment>;

export const AddAppGroupsMutation = graphql(
`mutation AddAppGroups($request: AddAppGroupsRequest!) {
value: addAppGroups(request: $request) {
...AddAppGroupsResult
}
}`,
[AddAppGroupsResult],
[AddAppGroupsResultFragment],
);
export type AddAppGroupsRequest = RequestOf<typeof AddAppGroupsMutation>;

const AddAppSignersResult = graphql(
const AddAppSignersResultFragment = graphql(
`fragment AddAppSignersResult on AddAppSignersResult {
...on SponsoredTransactionRequest {
...SponsoredTransactionRequest
Expand All @@ -129,19 +129,19 @@ const AddAppSignersResult = graphql(
TransactionWillFailFragment,
],
);
export type AddAppSignersResult = FragmentOf<typeof AddAppSignersResult>;
export type AddAppSignersResult = FragmentOf<typeof AddAppSignersResultFragment>;

export const AddAppSignersMutation = graphql(
`mutation AddAppSigners($request: AddAppSignersRequest!) {
value: addAppSigners(request: $request) {
...AddAppSignersResult
}
}`,
[AddAppSignersResult],
[AddAppSignersResultFragment],
);
export type AddAppSignersRequest = RequestOf<typeof AddAppSignersMutation>;

const RemoveAppFeedsResult = graphql(
const RemoveAppFeedsResultFragment = graphql(
`fragment RemoveAppFeedsResult on RemoveAppFeedsResult {
...on SponsoredTransactionRequest {
...SponsoredTransactionRequest
Expand All @@ -159,19 +159,19 @@ const RemoveAppFeedsResult = graphql(
TransactionWillFailFragment,
],
);
export type RemoveAppFeedsResult = FragmentOf<typeof RemoveAppFeedsResult>;
export type RemoveAppFeedsResult = FragmentOf<typeof RemoveAppFeedsResultFragment>;

export const RemoveAppFeedsMutation = graphql(
`mutation RemoveAppFeeds($request: RemoveAppFeedsRequest!) {
value: removeAppFeeds(request: $request) {
...RemoveAppFeedsResult
}
}`,
[RemoveAppFeedsResult],
[RemoveAppFeedsResultFragment],
);
export type RemoveAppFeedsRequest = RequestOf<typeof RemoveAppFeedsMutation>;

const RemoveAppGroupsResult = graphql(
const RemoveAppGroupsResultFragment = graphql(
`fragment RemoveAppGroupsResult on RemoveAppGroupsResult {
...on SponsoredTransactionRequest {
...SponsoredTransactionRequest
Expand All @@ -189,19 +189,19 @@ const RemoveAppGroupsResult = graphql(
TransactionWillFailFragment,
],
);
export type RemoveAppGroupsResult = FragmentOf<typeof RemoveAppGroupsResult>;
export type RemoveAppGroupsResult = FragmentOf<typeof RemoveAppGroupsResultFragment>;

export const RemoveAppGroupsMutation = graphql(
`mutation RemoveAppGroups($request: RemoveAppGroupsRequest!) {
value: removeAppGroups(request: $request) {
...RemoveAppGroupsResult
}
}`,
[RemoveAppGroupsResult],
[RemoveAppGroupsResultFragment],
);
export type RemoveAppGroupsRequest = RequestOf<typeof RemoveAppGroupsMutation>;

const RemoveAppSignersResult = graphql(
const RemoveAppSignersResultFragment = graphql(
`fragment RemoveAppSignersResult on RemoveAppSignersResult {
...on SponsoredTransactionRequest {
...SponsoredTransactionRequest
Expand All @@ -219,19 +219,19 @@ const RemoveAppSignersResult = graphql(
TransactionWillFailFragment,
],
);
export type RemoveAppSignersResult = FragmentOf<typeof RemoveAppSignersResult>;
export type RemoveAppSignersResult = FragmentOf<typeof RemoveAppSignersResultFragment>;

export const RemoveAppSignersMutation = graphql(
`mutation RemoveAppSigners($request: RemoveAppSignersRequest!) {
value: removeAppSigners(request: $request) {
...RemoveAppSignersResult
}
}`,
[RemoveAppSignersResult],
[RemoveAppSignersResultFragment],
);
export type RemoveAppSignersRequest = RequestOf<typeof RemoveAppSignersMutation>;

const SetAppGraphResult = graphql(
const SetAppGraphResultFragment = graphql(
`fragment SetAppGraphResult on SetAppGraphResult {
...on SponsoredTransactionRequest {
...SponsoredTransactionRequest
Expand All @@ -249,19 +249,19 @@ const SetAppGraphResult = graphql(
TransactionWillFailFragment,
],
);
export type SetAppGraphResult = FragmentOf<typeof SetAppGraphResult>;
export type SetAppGraphResult = FragmentOf<typeof SetAppGraphResultFragment>;

export const SetAppGraphMutation = graphql(
`mutation SetAppGraph($request: SetAppGraphRequest!) {
value: setAppGraph(request: $request) {
...SetAppGraphResult
}
}`,
[SetAppGraphResult],
[SetAppGraphResultFragment],
);
export type SetAppGraphRequest = RequestOf<typeof SetAppGraphMutation>;

const SetDefaultAppFeedResult = graphql(
const SetDefaultAppFeedResultFragment = graphql(
`fragment SetDefaultAppFeedResult on SetDefaultAppFeedResult {
...on SponsoredTransactionRequest {
...SponsoredTransactionRequest
Expand All @@ -279,19 +279,19 @@ const SetDefaultAppFeedResult = graphql(
TransactionWillFailFragment,
],
);
export type SetDefaultAppFeedResult = FragmentOf<typeof SetDefaultAppFeedResult>;
export type SetDefaultAppFeedResult = FragmentOf<typeof SetDefaultAppFeedResultFragment>;

export const SetDefaultAppFeedMutation = graphql(
`mutation SetDefaultAppFeed($request: SetDefaultAppFeedRequest!) {
value: setDefaultAppFeed(request: $request) {
...SetDefaultAppFeedResult
}
}`,
[SetDefaultAppFeedResult],
[SetDefaultAppFeedResultFragment],
);
export type SetDefaultAppFeedRequest = RequestOf<typeof SetDefaultAppFeedMutation>;

const SetAppMetadataResult = graphql(
const SetAppMetadataResultFragment = graphql(
`fragment SetAppMetadataResult on SetAppMetadataResult {
...on SponsoredTransactionRequest {
...SponsoredTransactionRequest
Expand All @@ -309,15 +309,15 @@ const SetAppMetadataResult = graphql(
TransactionWillFailFragment,
],
);
export type SetAppMetadataResult = FragmentOf<typeof SetAppMetadataResult>;
export type SetAppMetadataResult = FragmentOf<typeof SetAppMetadataResultFragment>;

export const SetAppMetadataMutation = graphql(
`mutation SetAppMetadata($request: SetAppMetadataRequest!) {
value: setAppMetadata(request: $request) {
...SetAppMetadataResult
}
}`,
[SetAppMetadataResult],
[SetAppMetadataResultFragment],
);
export type SetAppMetadataRequest = RequestOf<typeof SetAppMetadataMutation>;

Expand Down Expand Up @@ -351,7 +351,7 @@ export const SetAppVerificationMutation = graphql(
);
export type SetAppVerificationRequest = RequestOf<typeof SetAppVerificationMutation>;

const SetAppSponsorshipResult = graphql(
const SetAppSponsorshipResultFragment = graphql(
`fragment SetAppSponsorshipResult on SetAppSponsorshipResult {
...on SponsoredTransactionRequest {
...SponsoredTransactionRequest
Expand All @@ -369,19 +369,19 @@ const SetAppSponsorshipResult = graphql(
TransactionWillFailFragment,
],
);
export type SetAppSponsorshipResult = FragmentOf<typeof SetAppSponsorshipResult>;
export type SetAppSponsorshipResult = FragmentOf<typeof SetAppSponsorshipResultFragment>;

export const SetAppSponsorshipMutation = graphql(
`mutation SetAppSponsorship($request: SetAppSponsorshipRequest!) {
value: setAppSponsorship(request: $request) {
...SetAppSponsorshipResult
}
}`,
[SetAppSponsorshipResult],
[SetAppSponsorshipResultFragment],
);
export type SetAppSponsorshipRequest = RequestOf<typeof SetAppSponsorshipMutation>;

const SetAppTreasuryResult = graphql(
const SetAppTreasuryResultFragment = graphql(
`fragment SetAppTreasuryResult on SetAppTreasuryResult {
...on SponsoredTransactionRequest {
...SponsoredTransactionRequest
Expand All @@ -399,19 +399,19 @@ const SetAppTreasuryResult = graphql(
TransactionWillFailFragment,
],
);
export type SetAppTreasuryResult = FragmentOf<typeof SetAppTreasuryResult>;
export type SetAppTreasuryResult = FragmentOf<typeof SetAppTreasuryResultFragment>;

export const SetAppTreasuryMutation = graphql(
`mutation SetAppTreasury($request: SetAppTreasuryRequest!) {
value: setAppTreasury(request: $request) {
...SetAppTreasuryResult
}
}`,
[SetAppTreasuryResult],
[SetAppTreasuryResultFragment],
);
export type SetAppTreasuryRequest = RequestOf<typeof SetAppTreasuryMutation>;

const SetAppUsernameNamespaceResult = graphql(
const SetAppUsernameNamespaceResultFragment = graphql(
`fragment SetAppUsernameNamespaceResult on SetAppUsernameNamespaceResult {
...on SponsoredTransactionRequest {
...SponsoredTransactionRequest
Expand All @@ -429,14 +429,16 @@ const SetAppUsernameNamespaceResult = graphql(
TransactionWillFailFragment,
],
);
export type SetAppUsernameNamespaceResult = FragmentOf<typeof SetAppUsernameNamespaceResult>;
export type SetAppUsernameNamespaceResult = FragmentOf<
typeof SetAppUsernameNamespaceResultFragment
>;

export const SetAppUsernameNamespaceMutation = graphql(
`mutation SetAppUsernameNamespace($request: SetAppUsernameNamespaceRequest!) {
value: setAppUsernameNamespace(request: $request) {
...SetAppUsernameNamespaceResult
}
}`,
[SetAppUsernameNamespaceResult],
[SetAppUsernameNamespaceResultFragment],
);
export type SetAppUsernameNamespaceRequest = RequestOf<typeof SetAppUsernameNamespaceMutation>;
Loading

0 comments on commit 184c508

Please sign in to comment.