-
Notifications
You must be signed in to change notification settings - Fork 3
Use Graph to determine DAM availability based on cmp_Asset type
#184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the GraphClient to automatically detect Digital Asset Management (DAM) availability by querying the GraphQL schema for the cmp_Asset type, eliminating the need for developers to manually specify a damEnabled option when constructing the client.
Key Changes:
- Removes the
damEnabledproperty fromGraphOptionsand theGraphClientclass - Adds GraphQL introspection query for
cmp_Assettype in the metadata query - Refactors
getContentType()togetContentMetaData()which now returns both content type name and DAM availability status - Updates
getContentByPath()andgetPreviewContent()to use the dynamically determined DAM status
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
cmp_Asset typecmp_Asset type
This PR to check if we can use meta data query to check if we have
cmp_Assetavailable in graph. Which should indicate that CMP DAM is enabled in a particular instance.damEnabledto theGraphClient.