-
Notifications
You must be signed in to change notification settings - Fork 25
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 #153 from vtex-apps/bugfix/WISHLIST-exportList-gra…
…phql WISHLIST exportList graphql
- Loading branch information
Showing
9 changed files
with
115 additions
and
8 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
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,22 @@ | ||
using GraphQL; | ||
using GraphQL.Types; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using WishList.Models; | ||
|
||
namespace WishList.GraphQL.Types | ||
{ | ||
[GraphQLMetadata("ListItem")] | ||
public class ListItemsType : ObjectGraphType<ListItemsWrapper> | ||
{ | ||
public ListItemsType() | ||
{ | ||
Name = "ListItemsType"; | ||
|
||
Field(b => b.ListItems, type: typeof(ListGraphType<ListItemType>)).Description("List items"); | ||
Field(b => b.IsPublic, nullable: true).Description("If the list is public"); | ||
Field(b => b.Name, nullable: true).Description("List name"); | ||
} | ||
} | ||
} |
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,23 @@ | ||
using GraphQL; | ||
using GraphQL.Types; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using WishList.Models; | ||
using WishList.Services; | ||
|
||
namespace WishList.GraphQL.Types | ||
{ | ||
[GraphQLMetadata("WishListWrapperType")] | ||
public class WishListWrapperType : ObjectGraphType<WishListWrapper> | ||
{ | ||
public WishListWrapperType(IWishListService wishListService) | ||
{ | ||
Name = "WishListWrapperType"; | ||
|
||
Field(b => b.Id).Description("The wishlist Id"); | ||
Field(b => b.Email).Description("The shopper Id of the wishlist"); | ||
Field(b => b.ListItemsWrapper, type: typeof(ListGraphType<ListItemsType>)).Description("Wrapper of the list items"); | ||
} | ||
} | ||
} |
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,13 @@ | ||
query ExportList { | ||
exportList @context(provider: "vtex.wish-list") { | ||
listItemsWrapper { | ||
listItems { | ||
id | ||
productId | ||
sku | ||
title | ||
} | ||
} | ||
} | ||
} |