Skip to content

Commit

Permalink
Merge pull request #1084 from lens-protocol/cesare/lens-410-api-anyke…
Browse files Browse the repository at this point in the history
…yvalue-and-similar-unions-have-a-structural

feat: support GQL changes
  • Loading branch information
cesarenaldi authored Feb 22, 2025
2 parents 1eca6db + 164e1d7 commit 21f6571
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 31 deletions.
21 changes: 11 additions & 10 deletions packages/graphql/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ union AddReactionResult = AddReactionResponse | AddReactionFailure

type AddressKeyValue {
key: String!
value: EvmAddress!
address: EvmAddress!
}

type Admin {
Expand Down Expand Up @@ -942,7 +942,7 @@ union ArrayData = IntKeyValue | IntNullableKeyValue | AddressKeyValue | StringKe

type ArrayKeyValue {
key: String!
value: [ArrayData!]!
array: [ArrayData!]!
}

type ArticleMetadata {
Expand Down Expand Up @@ -1083,7 +1083,7 @@ scalar BigDecimal

type BigDecimalKeyValue {
key: String!
value: BigDecimal!
bigDecimal: BigDecimal!
}

scalar BigInt
Expand Down Expand Up @@ -1117,7 +1117,7 @@ input BookmarkPostRequest {

type BooleanKeyValue {
key: String!
value: Boolean!
boolean: Boolean!
}

type BooleanValue {
Expand Down Expand Up @@ -1630,7 +1630,7 @@ input DeleteSnsSubscriptionRequest {

type DictionaryKeyValue {
key: String!
value: [PrimitiveData!]!
dictionary: [PrimitiveData!]!
}

input DisableAccountActionRequest @oneOf {
Expand Down Expand Up @@ -3374,12 +3374,12 @@ enum IndexingStatus {

type IntKeyValue {
key: String!
value: Int!
int: Int!
}

type IntNullableKeyValue {
key: String!
value: Int
optionalInt: Int
}

input IsFollowedByMeRequest {
Expand Down Expand Up @@ -5804,6 +5804,7 @@ union PrimitiveData = IntKeyValue | IntNullableKeyValue | AddressKeyValue | Stri

type Query {
health: Boolean!
maintenance: Boolean!

"""Get an account by address, username, or legacy profile ID."""
account(request: AccountRequest!): Account
Expand Down Expand Up @@ -6012,12 +6013,12 @@ type QuoteNotification {

type RawKeyValue {
key: BlockchainData!
value: BlockchainData!
data: BlockchainData!
}

input RawKeyValueInput {
key: BlockchainData!
value: BlockchainData!
data: BlockchainData!
}

type ReactionNotification {
Expand Down Expand Up @@ -6812,7 +6813,7 @@ type StoryMetadata {

type StringKeyValue {
key: String!
value: String!
string: String!
}

type SubOperationStatus {
Expand Down
18 changes: 9 additions & 9 deletions packages/graphql/src/fragments/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const IntKeyValueFragment = graphql(
`fragment IntKeyValue on IntKeyValue {
__typename
key
value
int
}`,
);
export type IntKeyValue = FragmentOf<typeof IntKeyValueFragment>;
Expand All @@ -23,7 +23,7 @@ const IntNullableKeyValueFragment = graphql(
`fragment IntNullableKeyValue on IntNullableKeyValue {
__typename
key
value
optionalInt
}`,
);
export type IntNullableKeyValue = FragmentOf<typeof IntNullableKeyValueFragment>;
Expand All @@ -32,7 +32,7 @@ const AddressKeyValueFragment = graphql(
`fragment AddressKeyValue on AddressKeyValue {
__typename
key
value
address
}`,
);
export type AddressKeyValue = FragmentOf<typeof AddressKeyValueFragment>;
Expand All @@ -41,7 +41,7 @@ const StringKeyValueFragment = graphql(
`fragment StringKeyValue on StringKeyValue {
__typename
key
value
string
}`,
);
export type StringKeyValue = FragmentOf<typeof StringKeyValueFragment>;
Expand All @@ -50,7 +50,7 @@ const BooleanKeyValueFragment = graphql(
`fragment BooleanKeyValue on BooleanKeyValue {
__typename
key
value
boolean
}`,
);
export type BooleanKeyValue = FragmentOf<typeof BooleanKeyValueFragment>;
Expand All @@ -59,7 +59,7 @@ const RawKeyValueFragment = graphql(
`fragment RawKeyValue on RawKeyValue {
__typename
key
value
data
}`,
);
export type RawKeyValue = FragmentOf<typeof RawKeyValueFragment>;
Expand All @@ -68,7 +68,7 @@ const BigDecimalKeyValueFragment = graphql(
`fragment BigDecimalKeyValue on BigDecimalKeyValue {
__typename
key
value
bigDecimal
}`,
);
export type BigDecimalKeyValue = FragmentOf<typeof BigDecimalKeyValueFragment>;
Expand Down Expand Up @@ -120,7 +120,7 @@ const DictionaryKeyValueFragment = graphql(
`fragment DictionaryKeyValue on DictionaryKeyValue {
__typename
key
value {
dictionary {
...PrimitiveData
}
}`,
Expand Down Expand Up @@ -180,7 +180,7 @@ const ArrayKeyValueFragment = graphql(
`fragment ArrayKeyValue on ArrayKeyValue {
__typename
key
value {
array {
...ArrayData
}
}`,
Expand Down
1 change: 1 addition & 0 deletions packages/graphql/src/fragments/primitives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,7 @@ export const GroupFragment = graphql(
`fragment Group on Group {
__typename
address
feed
timestamp
owner
banningEnabled
Expand Down
Loading

0 comments on commit 21f6571

Please sign in to comment.