-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#### What is the purpose of this pull request? This PR creates and exports the sponsoredBanners query. #### What problem is this solving? We need to create Sponsored Banners for our clients. To do this, it's necessary to request the banners data to Ad Server. The store-resources create the query and exports it for Sponsored Banners component. #### Types of changes * [ ] Bug fix (a non-breaking change which fixes an issue) * [x] New feature (a non-breaking change which adds functionality) * [ ] Breaking change (fix or feature that would cause existing functionality to change) * [ ] Requires change to documentation, which has been updated accordingly.
- Loading branch information
1 parent
35889b7
commit 4d1a32f
Showing
4 changed files
with
33 additions
and
1 deletion.
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
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,3 @@ | ||
import QuerySponsoredBanners from './queries/sponsoredBanners.gql' | ||
|
||
export default QuerySponsoredBanners |
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,24 @@ | ||
query sponsoredBanners( | ||
$sponsoredCount: Int | ||
$placement: Placement | ||
$adUnit: AdUnit | ||
$channel: Channel | ||
$anonymousId: String | ||
) { | ||
sponsoredBanners( | ||
sponsoredCount: $sponsoredCount | ||
placement: $placement | ||
adUnit: $adUnit | ||
channel: $channel | ||
anonymousId: $anonymousId | ||
) @context(provider: "vtex.adserver-graphql") { | ||
adResponseId | ||
advertisement { | ||
bannerImageId | ||
imageUrl | ||
targetUrl | ||
width | ||
height | ||
} | ||
} | ||
} |