Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Minor updates
  • Loading branch information
melnikovi committed Oct 20, 2020
commit 6547dbd71d11c3f31c890ad1fbbb0c0542fdf726
13 changes: 3 additions & 10 deletions design-documents/graph-ql/coverage/dynamic-blocks.graphqls
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
type DynamicBlock {
uid: ID!
name: String!
content: String!
Copy link
Member Author

@melnikovi melnikovi Oct 8, 2020

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.

}

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!
Copy link

@supernova-at supernova-at Oct 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is rotation_mode required?

I don't think the PWA will know this when it is querying.

Copy link
Member Author

@melnikovi melnikovi Oct 22, 2020

Choose a reason for hiding this comment

The 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.

Choose a reason for hiding this comment

The 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 {
Expand Down