-
Notifications
You must be signed in to change notification settings - Fork 150
GraphQL schema for dynamic blocks #451
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,19 @@ | ||
| type DynamicBlock { | ||
| uid: ID! | ||
| name: String! | ||
| content: String! | ||
| } | ||
|
|
||
| type DynamicBlocks { | ||
| items: [DynamicBlock]! | ||
| page_info: SearchResultPageInfo | ||
| total_count: Int! | ||
| } | ||
|
|
||
| # We don't need is_enabled, locations, ga_creative, catalog_price_rule_ids, cart_price_rules_ids, locations on storefront | ||
| # We don't need name, is_enabled, locations, ga_creative, catalog_price_rule_ids, cart_price_rules_ids, locations on storefront | ||
|
|
||
| type DynamicBlocksFilterInput { | ||
| type: DynamicBlockTypeEnum! | ||
| locations: [DynamicBlockLocationEnum!] # Blocks for all locations will be displayed if not supplied | ||
| rotation_mode: DynamicBlockRotationModeEnum! | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is I don't think the PWA will know this when it is querying.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This setting allows to request one random dynamic block, multiple dynamic block to display all at once, etc. rotation_mode comes from the data-rotate attribute on the dynamic block node. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, right - ok, thanks! |
||
| dynamic_block_uids: [Int!] # Only makes sense when DynamicBlockTypeEnum is set to SPECIFIED | ||
| dynamic_block_uids: [ID!] # Only makes sense when DynamicBlockTypeEnum is set to SPECIFIED | ||
| } | ||
|
|
||
| type DynamicBlocksOutput { | ||
| dynamic_blocks: DynamicBlocks! | ||
| items: [DynamicBlock]! | ||
| } | ||
|
|
||
| enum DynamicBlockTypeEnum { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
We can make it ComplexTextValue, that would allow to return content as a JSON in the future.