Skip to content

Commit

Permalink
Merge pull request #1092 from lens-protocol/juan/lens-497-sdk-update-…
Browse files Browse the repository at this point in the history
…after-removing-tippingpostaction-fragment

chore: update schema after removing TippingPostAction
  • Loading branch information
cesarenaldi authored Mar 4, 2025
2 parents ce9ec3b + bdeeed4 commit 76ae741
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 21 deletions.
2 changes: 1 addition & 1 deletion packages/client/src/actions/accountManager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe(`Given the '${createAccountWithUsername.name}' action`, { timeout: 1000
});

describe('When creating a new Account', () => {
it('Then it should have Signless enabled by defailt', async () => {
it('Then it should have Signless enabled by default', async () => {
const result = await fetchMeDetails(sessionClient);

assertOk(result);
Expand Down
10 changes: 5 additions & 5 deletions packages/graphql/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -5389,7 +5389,11 @@ input PostAccountPair {
account: EvmAddress!
}

union PostAction = SimpleCollectAction | TippingPostAction | UnknownAction
"""
The configured actions for a post. All posts have the TippingPostAction enabled by default which
is not listed here.
"""
union PostAction = SimpleCollectAction | UnknownAction

input PostActionConfigInput @oneOf {
simpleCollect: SimpleCollectActionConfigInput
Expand Down Expand Up @@ -7025,10 +7029,6 @@ type TippingAccountAction {
address: EvmAddress!
}

type TippingPostAction {
address: EvmAddress!
}

type TippingPostActionContract {
address: EvmAddress!
}
Expand Down
14 changes: 1 addition & 13 deletions packages/graphql/src/fragments/post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,28 +66,16 @@ export const SimpleCollectActionFragment = graphql(
);
export type SimpleCollectAction = FragmentOf<typeof SimpleCollectActionFragment>;

export const TippingPostActionFragment = graphql(
`fragment TippingPostAction on TippingPostAction {
__typename
address
}`,
[],
);
export type TippingPostAction = FragmentOf<typeof TippingPostActionFragment>;

export const PostActionFragment = graphql(
`fragment PostAction on PostAction {
... on SimpleCollectAction {
...SimpleCollectAction
}
... on TippingPostAction {
...TippingPostAction
}
... on UnknownAction {
...UnknownAction
}
}`,
[SimpleCollectActionFragment, TippingPostActionFragment, UnknownActionFragment],
[SimpleCollectActionFragment, UnknownActionFragment],
);
export type PostAction = FragmentOf<typeof PostActionFragment>;

Expand Down
3 changes: 1 addition & 2 deletions packages/graphql/src/graphql-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ export type introspection_types = {
'PhysicalAddress': { kind: 'OBJECT'; name: 'PhysicalAddress'; fields: { 'country': { name: 'country'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'formatted': { name: 'formatted'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'locality': { name: 'locality'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'postalCode': { name: 'postalCode'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'region': { name: 'region'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'streetAddress': { name: 'streetAddress'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; };
'Post': { kind: 'OBJECT'; name: 'Post'; fields: { 'actions': { name: 'actions'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'PostAction'; ofType: null; }; }; }; } }; 'app': { name: 'app'; type: { kind: 'OBJECT'; name: 'App'; ofType: null; } }; 'author': { name: 'author'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Account'; ofType: null; }; } }; 'collectibleMetadata': { name: 'collectibleMetadata'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'NftMetadata'; ofType: null; }; } }; 'commentOn': { name: 'commentOn'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'contentUri': { name: 'contentUri'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'URI'; ofType: null; }; } }; 'feed': { name: 'feed'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PostFeedInfo'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'PostId'; ofType: null; }; } }; 'isDeleted': { name: 'isDeleted'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'isEdited': { name: 'isEdited'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'mentions': { name: 'mentions'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'PostMention'; ofType: null; }; }; }; } }; 'metadata': { name: 'metadata'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'PostMetadata'; ofType: null; }; } }; 'operations': { name: 'operations'; type: { kind: 'OBJECT'; name: 'LoggedInPostOperations'; ofType: null; } }; 'quoteOf': { name: 'quoteOf'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'root': { name: 'root'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'rules': { name: 'rules'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PostRules'; ofType: null; }; } }; 'slug': { name: 'slug'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'PostId'; ofType: null; }; } }; 'stats': { name: 'stats'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PostStats'; ofType: null; }; } }; 'timestamp': { name: 'timestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; } }; }; };
'PostAccountPair': { kind: 'INPUT_OBJECT'; name: 'PostAccountPair'; isOneOf: false; inputFields: [{ name: 'post'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'PostId'; ofType: null; }; }; defaultValue: null }, { name: 'account'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; }; defaultValue: null }]; };
'PostAction': { kind: 'UNION'; name: 'PostAction'; fields: {}; possibleTypes: 'SimpleCollectAction' | 'TippingPostAction' | 'UnknownAction'; };
'PostAction': { kind: 'UNION'; name: 'PostAction'; fields: {}; possibleTypes: 'SimpleCollectAction' | 'UnknownAction'; };
'PostActionConfigInput': { kind: 'INPUT_OBJECT'; name: 'PostActionConfigInput'; isOneOf: true; inputFields: [{ name: 'simpleCollect'; type: { kind: 'INPUT_OBJECT'; name: 'SimpleCollectActionConfigInput'; ofType: null; }; defaultValue: null }, { name: 'unknown'; type: { kind: 'INPUT_OBJECT'; name: 'UnknownActionConfigInput'; ofType: null; }; defaultValue: null }]; };
'PostActionContract': { kind: 'UNION'; name: 'PostActionContract'; fields: {}; possibleTypes: 'SimpleCollectActionContract' | 'TippingPostActionContract' | 'UnknownPostActionContract'; };
'PostActionContractsRequest': { kind: 'INPUT_OBJECT'; name: 'PostActionContractsRequest'; isOneOf: false; inputFields: [{ name: 'includeUnknown'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: "false" }, { name: 'onlyCollectActions'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: "false" }, { name: 'pageSize'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'PageSize'; ofType: null; }; }; defaultValue: "FIFTY" }, { name: 'cursor'; type: { kind: 'SCALAR'; name: 'Cursor'; ofType: null; }; defaultValue: null }]; };
Expand Down Expand Up @@ -701,7 +701,6 @@ export type introspection_types = {
'TimelineItem': { kind: 'OBJECT'; name: 'TimelineItem'; fields: { 'comments': { name: 'comments'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Post'; ofType: null; }; }; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'UUID'; ofType: null; }; } }; 'primary': { name: 'primary'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Post'; ofType: null; }; } }; 'reposts': { name: 'reposts'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Repost'; ofType: null; }; }; }; } }; }; };
'TimelineRequest': { kind: 'INPUT_OBJECT'; name: 'TimelineRequest'; isOneOf: false; inputFields: [{ name: 'account'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; }; defaultValue: null }, { name: 'filter'; type: { kind: 'INPUT_OBJECT'; name: 'TimelineFilter'; ofType: null; }; defaultValue: null }, { name: 'cursor'; type: { kind: 'SCALAR'; name: 'Cursor'; ofType: null; }; defaultValue: null }]; };
'TippingAccountAction': { kind: 'OBJECT'; name: 'TippingAccountAction'; fields: { 'address': { name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; } }; }; };
'TippingPostAction': { kind: 'OBJECT'; name: 'TippingPostAction'; fields: { 'address': { name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; } }; }; };
'TippingPostActionContract': { kind: 'OBJECT'; name: 'TippingPostActionContract'; fields: { 'address': { name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; } }; }; };
'TokenAmountInput': { kind: 'INPUT_OBJECT'; name: 'TokenAmountInput'; isOneOf: false; inputFields: [{ name: 'standard'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'TokenStandard'; ofType: null; }; }; defaultValue: null }, { name: 'currency'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; }; defaultValue: null }, { name: 'value'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigDecimal'; ofType: null; }; }; defaultValue: null }, { name: 'typeId'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }]; };
'TokenGatedFeedRuleConfig': { kind: 'INPUT_OBJECT'; name: 'TokenGatedFeedRuleConfig'; isOneOf: false; inputFields: [{ name: 'token'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'TokenAmountInput'; ofType: null; }; }; defaultValue: null }]; };
Expand Down

0 comments on commit 76ae741

Please sign in to comment.