{"action":"opened","issue":{"url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/issues/117","repository_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit","labels_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/issues/117/labels{/name}","comments_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/issues/117/comments","events_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/issues/117/events","html_url":"https://github.com/reactioncommerce/reaction-next-starterkit/issues/117","id":328585830,"node_id":"MDU6SXNzdWUzMjg1ODU4MzA=","number":117,"title":"Handling currency for a product","user":{"login":"mikemurray","id":42217,"node_id":"MDQ6VXNlcjQyMjE3","avatar_url":"https://avatars3.githubusercontent.com/u/42217?v=4","gravatar_id":"","url":"https://api.github.com/users/mikemurray","html_url":"https://github.com/mikemurray","followers_url":"https://api.github.com/users/mikemurray/followers","following_url":"https://api.github.com/users/mikemurray/following{/other_user}","gists_url":"https://api.github.com/users/mikemurray/gists{/gist_id}","starred_url":"https://api.github.com/users/mikemurray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikemurray/subscriptions","organizations_url":"https://api.github.com/users/mikemurray/orgs","repos_url":"https://api.github.com/users/mikemurray/repos","events_url":"https://api.github.com/users/mikemurray/events{/privacy}","received_events_url":"https://api.github.com/users/mikemurray/received_events","type":"User","site_admin":false},"labels":[{"id":889197976,"node_id":"MDU6TGFiZWw4ODkxOTc5NzY=","url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/labels/question","name":"question","color":"d876e3","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/milestones/5","html_url":"https://github.com/reactioncommerce/reaction-next-starterkit/milestone/5","labels_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/milestones/5/labels","id":3384238,"node_id":"MDk6TWlsZXN0b25lMzM4NDIzOA==","number":5,"title":"Fletcher","description":"Core Team Milestone\nMay 29, 2018 - June 11, 2018","creator":{"login":"spencern","id":1203639,"node_id":"MDQ6VXNlcjEyMDM2Mzk=","avatar_url":"https://avatars0.githubusercontent.com/u/1203639?v=4","gravatar_id":"","url":"https://api.github.com/users/spencern","html_url":"https://github.com/spencern","followers_url":"https://api.github.com/users/spencern/followers","following_url":"https://api.github.com/users/spencern/following{/other_user}","gists_url":"https://api.github.com/users/spencern/gists{/gist_id}","starred_url":"https://api.github.com/users/spencern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spencern/subscriptions","organizations_url":"https://api.github.com/users/spencern/orgs","repos_url":"https://api.github.com/users/spencern/repos","events_url":"https://api.github.com/users/spencern/events{/privacy}","received_events_url":"https://api.github.com/users/spencern/received_events","type":"User","site_admin":false},"open_issues":14,"closed_issues":3,"state":"open","created_at":"2018-05-29T14:30:51Z","updated_at":"2018-06-01T16:35:51Z","due_on":"2018-06-11T07:00:00Z","closed_at":null},"comments":0,"created_at":"2018-06-01T16:35:51Z","updated_at":"2018-06-01T16:35:51Z","closed_at":null,"author_association":"MEMBER","body":"## Issue\r\n\r\nWith the catalogItemProduct query, you can get the currency for the product by adding a subfield for `shop.currency.code`. \r\n\r\n```graphql\r\nproduct {\r\n      shop {\r\n        currency {\r\n          code\r\n        }\r\n      }\r\n}\r\n```\r\n\r\nYou can also get the currency for the primary shop by using the `@withShop` decorator.\r\nIn a single shop situation, both will produce the same currency code. \r\n\r\nThis breaks down when\r\n\r\n1. Users can switch currency\r\n2. Multiple shops with different currencies. ( `@withShop` only provides the primary shop )\r\n\r\n\r\n## Questions\r\n\r\n- Where should the currency code come from. The shop, the user, or the product?\r\n\r\n- Should I be able to do get the currency of the product by user? Or expect to get it from the viewer?\r\n\r\n```graphql\r\nproduct {\r\n      user {\r\n        currency {\r\n          code\r\n        }\r\n      }\r\n}\r\n```\r\n"}}
{"actor":{"display_login":"mikemurray"}}