-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #576 from lens-protocol/fix/missing__typename
fix: missing __typename(s) and profile.invitedBy fields
- Loading branch information
Showing
30 changed files
with
1,164 additions
and
414 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@lens-protocol/api-bindings": patch | ||
"@lens-protocol/react": patch | ||
--- | ||
|
||
**fix:** adds missing `__typename` and expose `ProfileFields` from `Profile.invitedBy` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { | ||
MetadataBooleanAttribute, | ||
MetadataDateAttribute, | ||
MetadataJsonAttribute, | ||
MetadataNumberAttribute, | ||
MetadataStringAttribute, | ||
} from './graphql/generated'; | ||
|
||
/** | ||
* Convenience type for metadata attributes. | ||
* | ||
* @example | ||
* Use this type as prop type for a component that renders metadata attributes. | ||
* ```tsx | ||
* | ||
* function PublicationAttribute({ attribute }: { attribute: MetadataAttribute }) { | ||
* switch (attribute.__typename) { | ||
* case 'MetadataBooleanAttribute': | ||
* return <p><strong>{attribute.key}</strong>{attribute.value === 'true' ? 'Yes' : 'No'}</p>; | ||
* | ||
* case 'MetadataDateAttribute': | ||
* return <p><strong>{attribute.key}</strong>{new Date(attribute.value).toLocaleString()}</p>; | ||
* | ||
* case 'MetadataNumberAttribute': | ||
* return <p><strong>{attribute.key}</strong>{parseFloat(attribute.value).toFixed(2)}</p>; | ||
* | ||
* // ... | ||
* } | ||
* ``` | ||
*/ | ||
export type MetadataAttribute = | ||
| MetadataBooleanAttribute | ||
| MetadataDateAttribute | ||
| MetadataNumberAttribute | ||
| MetadataJsonAttribute | ||
| MetadataStringAttribute; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.