{"action":"created","comment":{"url":"https://api.github.com/repos/magento/graphql-ce/pulls/comments/189085789","pull_request_review_id":121197606,"id":189085789,"diff_hunk":"@@ -0,0 +1,61 @@\n+<?php\n+/**\n+ * Copyright © Magento, Inc. All rights reserved.\n+ * See COPYING.txt for license details.\n+ */\n+declare(strict_types=1);\n+\n+namespace Magento\\CatalogGraphQl\\Model\\Resolver\\Category;\n+\n+use Magento\\Framework\\GraphQl\\Schema\\Type\\ResolveInfo;\n+use Magento\\Framework\\GraphQl\\Config\\Element\\Field;\n+use Magento\\Framework\\GraphQl\\Query\\Resolver\\Value;\n+use Magento\\Framework\\GraphQl\\Query\\Resolver\\ValueFactory;\n+use Magento\\Framework\\GraphQl\\Query\\ResolverInterface;\n+\n+/**\n+ * Retrieves the sort fields options information object\n+ */\n+class SortFieldsOptions implements ResolverInterface\n+{\n+    /**\n+     * @var ValueFactory\n+     */\n+    private $valueFactory;\n+\n+    /**\n+     * @var \\Magento\\Catalog\\Model\\Config\n+     */\n+    private $catalogConfig;\n+\n+    /**\n+     * @param ValueFactory $valueFactory\n+     * @param \\Magento\\Catalog\\Model\\Config $catalogConfig\n+     */\n+    public function __construct(\n+        ValueFactory $valueFactory,\n+        \\Magento\\Catalog\\Model\\Config $catalogConfig\n+    ) {\n+        $this->valueFactory = $valueFactory;\n+        $this->catalogConfig = $catalogConfig;\n+    }\n+\n+    /**\n+     * {@inheritDoc}\n+     */\n+    public function resolve(Field $field, $context, ResolveInfo $info, array $value = null, array $args = null) : Value\n+    {\n+        $sortFieldsOptions = [","path":"app/code/Magento/CatalogGraphQl/Model/Resolver/Category/SortFieldsOptions.php","position":48,"original_position":48,"commit_id":"d804babe4d2c5cf71e0c46b72221f566df24978b","original_commit_id":"d804babe4d2c5cf71e0c46b72221f566df24978b","user":{"login":"paliarush","id":10828073,"avatar_url":"https://avatars0.githubusercontent.com/u/10828073?v=4","gravatar_id":"","url":"https://api.github.com/users/paliarush","html_url":"https://github.com/paliarush","followers_url":"https://api.github.com/users/paliarush/followers","following_url":"https://api.github.com/users/paliarush/following{/other_user}","gists_url":"https://api.github.com/users/paliarush/gists{/gist_id}","starred_url":"https://api.github.com/users/paliarush/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paliarush/subscriptions","organizations_url":"https://api.github.com/users/paliarush/orgs","repos_url":"https://api.github.com/users/paliarush/repos","events_url":"https://api.github.com/users/paliarush/events{/privacy}","received_events_url":"https://api.github.com/users/paliarush/received_events","type":"User","site_admin":false},"body":"How about this one `\\Magento\\Catalog\\Model\\Config::getAttributeUsedForSortByArray`?","created_at":"2018-05-17T20:11:17Z","updated_at":"2018-05-17T20:11:17Z","html_url":"https://github.com/magento/graphql-ce/pull/12#discussion_r189085789","pull_request_url":"https://api.github.com/repos/magento/graphql-ce/pulls/12","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/magento/graphql-ce/pulls/comments/189085789"},"html":{"href":"https://github.com/magento/graphql-ce/pull/12#discussion_r189085789"},"pull_request":{"href":"https://api.github.com/repos/magento/graphql-ce/pulls/12"}},"in_reply_to_id":189007093},"pull_request":{"url":"https://api.github.com/repos/magento/graphql-ce/pulls/12","id":187620694,"html_url":"https://github.com/magento/graphql-ce/pull/12","diff_url":"https://github.com/magento/graphql-ce/pull/12.diff","patch_url":"https://github.com/magento/graphql-ce/pull/12.patch","issue_url":"https://api.github.com/repos/magento/graphql-ce/issues/12","number":12,"state":"open","locked":false,"title":"GraphQL - Added sort by options to Products GraphQL type","user":{"login":"zbigniewkuras","id":22236689,"avatar_url":"https://avatars3.githubusercontent.com/u/22236689?v=4","gravatar_id":"","url":"https://api.github.com/users/zbigniewkuras","html_url":"https://github.com/zbigniewkuras","followers_url":"https://api.github.com/users/zbigniewkuras/followers","following_url":"https://api.github.com/users/zbigniewkuras/following{/other_user}","gists_url":"https://api.github.com/users/zbigniewkuras/gists{/gist_id}","starred_url":"https://api.github.com/users/zbigniewkuras/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zbigniewkuras/subscriptions","organizations_url":"https://api.github.com/users/zbigniewkuras/orgs","repos_url":"https://api.github.com/users/zbigniewkuras/repos","events_url":"https://api.github.com/users/zbigniewkuras/events{/privacy}","received_events_url":"https://api.github.com/users/zbigniewkuras/received_events","type":"User","site_admin":false},"body":"### Description\r\nAdded available sort options and default sort option for product listing to page_info object of Products GraphQL object.\r\n\r\n### Fixed Issues (if relevant)\r\n1. magento/graphql-ce#3: Return 'Available sort options' for product listing\r\n\r\n### Manual testing scenarios\r\n1. Add following object to query object page_info and run:\r\n`sort_fields {\r\n        default\r\n        options {\r\n          key\r\n          label\r\n        }\r\n      }`\r\n2. Magento should returns object sort_fields contains default and options \r\n\r\n### Contribution checklist\r\n - [ ] Pull request has a meaningful description of its purpose\r\n - [ ] All commits are accompanied by meaningful commit messages\r\n - [ ] All new or changed code is covered with unit/integration tests (if applicable)\r\n - [ ] All automated tests passed successfully (all builds on Travis CI are green)\r\n","created_at":"2018-05-12T13:12:44Z","updated_at":"2018-05-17T20:11:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"74f7f2a1ce624441798bf2b1bfbfd0e98023edc9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":930887405,"url":"https://api.github.com/repos/magento/graphql-ce/labels/fra-rz-cd","name":"fra-rz-cd","color":"f0fcae","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/magento/graphql-ce/pulls/12/commits","review_comments_url":"https://api.github.com/repos/magento/graphql-ce/pulls/12/comments","review_comment_url":"https://api.github.com/repos/magento/graphql-ce/pulls/comments{/number}","comments_url":"https://api.github.com/repos/magento/graphql-ce/issues/12/comments","statuses_url":"https://api.github.com/repos/magento/graphql-ce/statuses/d804babe4d2c5cf71e0c46b72221f566df24978b","head":{"label":"zbigniewkuras:issiue-3","ref":"issiue-3","sha":"d804babe4d2c5cf71e0c46b72221f566df24978b","user":{"login":"zbigniewkuras","id":22236689,"avatar_url":"https://avatars3.githubusercontent.com/u/22236689?v=4","gravatar_id":"","url":"https://api.github.com/users/zbigniewkuras","html_url":"https://github.com/zbigniewkuras","followers_url":"https://api.github.com/users/zbigniewkuras/followers","following_url":"https://api.github.com/users/zbigniewkuras/following{/other_user}","gists_url":"https://api.github.com/users/zbigniewkuras/gists{/gist_id}","starred_url":"https://api.github.com/users/zbigniewkuras/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zbigniewkuras/subscriptions","organizations_url":"https://api.github.com/users/zbigniewkuras/orgs","repos_url":"https://api.github.com/users/zbigniewkuras/repos","events_url":"https://api.github.com/users/zbigniewkuras/events{/privacy}","received_events_url":"https://api.github.com/users/zbigniewkuras/received_events","type":"User","site_admin":false},"repo":{"id":133126515,"name":"graphql-ce","full_name":"zbigniewkuras/graphql-ce","owner":{"login":"zbigniewkuras","id":22236689,"avatar_url":"https://avatars3.githubusercontent.com/u/22236689?v=4","gravatar_id":"","url":"https://api.github.com/users/zbigniewkuras","html_url":"https://github.com/zbigniewkuras","followers_url":"https://api.github.com/users/zbigniewkuras/followers","following_url":"https://api.github.com/users/zbigniewkuras/following{/other_user}","gists_url":"https://api.github.com/users/zbigniewkuras/gists{/gist_id}","starred_url":"https://api.github.com/users/zbigniewkuras/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zbigniewkuras/subscriptions","organizations_url":"https://api.github.com/users/zbigniewkuras/orgs","repos_url":"https://api.github.com/users/zbigniewkuras/repos","events_url":"https://api.github.com/users/zbigniewkuras/events{/privacy}","received_events_url":"https://api.github.com/users/zbigniewkuras/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zbigniewkuras/graphql-ce","description":"Magento 2 GraphQL community project","fork":true,"url":"https://api.github.com/repos/zbigniewkuras/graphql-ce","forks_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/forks","keys_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/teams","hooks_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/hooks","issue_events_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/issues/events{/number}","events_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/events","assignees_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/assignees{/user}","branches_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/branches{/branch}","tags_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/tags","blobs_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/git/refs{/sha}","trees_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/statuses/{sha}","languages_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/languages","stargazers_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/stargazers","contributors_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/contributors","subscribers_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/subscribers","subscription_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/subscription","commits_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/commits{/sha}","git_commits_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/git/commits{/sha}","comments_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/comments{/number}","issue_comment_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/issues/comments{/number}","contents_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/contents/{+path}","compare_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/merges","archive_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/downloads","issues_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/issues{/number}","pulls_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/pulls{/number}","milestones_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/milestones{/number}","notifications_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/labels{/name}","releases_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/releases{/id}","deployments_url":"https://api.github.com/repos/zbigniewkuras/graphql-ce/deployments","created_at":"2018-05-12T08:07:00Z","updated_at":"2018-05-12T08:08:10Z","pushed_at":"2018-05-16T21:12:27Z","git_url":"git://github.com/zbigniewkuras/graphql-ce.git","ssh_url":"git@github.com:zbigniewkuras/graphql-ce.git","clone_url":"https://github.com/zbigniewkuras/graphql-ce.git","svn_url":"https://github.com/zbigniewkuras/graphql-ce","homepage":"","size":341249,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"2.3-develop"}},"base":{"label":"magento:2.3-develop","ref":"2.3-develop","sha":"fdaa419179a819dc26febc69321fc0e5c70570f5","user":{"login":"magento","id":168457,"avatar_url":"https://avatars2.githubusercontent.com/u/168457?v=4","gravatar_id":"","url":"https://api.github.com/users/magento","html_url":"https://github.com/magento","followers_url":"https://api.github.com/users/magento/followers","following_url":"https://api.github.com/users/magento/following{/other_user}","gists_url":"https://api.github.com/users/magento/gists{/gist_id}","starred_url":"https://api.github.com/users/magento/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magento/subscriptions","organizations_url":"https://api.github.com/users/magento/orgs","repos_url":"https://api.github.com/users/magento/repos","events_url":"https://api.github.com/users/magento/events{/privacy}","received_events_url":"https://api.github.com/users/magento/received_events","type":"Organization","site_admin":false},"repo":{"id":128075669,"name":"graphql-ce","full_name":"magento/graphql-ce","owner":{"login":"magento","id":168457,"avatar_url":"https://avatars2.githubusercontent.com/u/168457?v=4","gravatar_id":"","url":"https://api.github.com/users/magento","html_url":"https://github.com/magento","followers_url":"https://api.github.com/users/magento/followers","following_url":"https://api.github.com/users/magento/following{/other_user}","gists_url":"https://api.github.com/users/magento/gists{/gist_id}","starred_url":"https://api.github.com/users/magento/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magento/subscriptions","organizations_url":"https://api.github.com/users/magento/orgs","repos_url":"https://api.github.com/users/magento/repos","events_url":"https://api.github.com/users/magento/events{/privacy}","received_events_url":"https://api.github.com/users/magento/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/magento/graphql-ce","description":"Magento 2 GraphQL community project","fork":false,"url":"https://api.github.com/repos/magento/graphql-ce","forks_url":"https://api.github.com/repos/magento/graphql-ce/forks","keys_url":"https://api.github.com/repos/magento/graphql-ce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/magento/graphql-ce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/magento/graphql-ce/teams","hooks_url":"https://api.github.com/repos/magento/graphql-ce/hooks","issue_events_url":"https://api.github.com/repos/magento/graphql-ce/issues/events{/number}","events_url":"https://api.github.com/repos/magento/graphql-ce/events","assignees_url":"https://api.github.com/repos/magento/graphql-ce/assignees{/user}","branches_url":"https://api.github.com/repos/magento/graphql-ce/branches{/branch}","tags_url":"https://api.github.com/repos/magento/graphql-ce/tags","blobs_url":"https://api.github.com/repos/magento/graphql-ce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/magento/graphql-ce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/magento/graphql-ce/git/refs{/sha}","trees_url":"https://api.github.com/repos/magento/graphql-ce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/magento/graphql-ce/statuses/{sha}","languages_url":"https://api.github.com/repos/magento/graphql-ce/languages","stargazers_url":"https://api.github.com/repos/magento/graphql-ce/stargazers","contributors_url":"https://api.github.com/repos/magento/graphql-ce/contributors","subscribers_url":"https://api.github.com/repos/magento/graphql-ce/subscribers","subscription_url":"https://api.github.com/repos/magento/graphql-ce/subscription","commits_url":"https://api.github.com/repos/magento/graphql-ce/commits{/sha}","git_commits_url":"https://api.github.com/repos/magento/graphql-ce/git/commits{/sha}","comments_url":"https://api.github.com/repos/magento/graphql-ce/comments{/number}","issue_comment_url":"https://api.github.com/repos/magento/graphql-ce/issues/comments{/number}","contents_url":"https://api.github.com/repos/magento/graphql-ce/contents/{+path}","compare_url":"https://api.github.com/repos/magento/graphql-ce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/magento/graphql-ce/merges","archive_url":"https://api.github.com/repos/magento/graphql-ce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/magento/graphql-ce/downloads","issues_url":"https://api.github.com/repos/magento/graphql-ce/issues{/number}","pulls_url":"https://api.github.com/repos/magento/graphql-ce/pulls{/number}","milestones_url":"https://api.github.com/repos/magento/graphql-ce/milestones{/number}","notifications_url":"https://api.github.com/repos/magento/graphql-ce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/magento/graphql-ce/labels{/name}","releases_url":"https://api.github.com/repos/magento/graphql-ce/releases{/id}","deployments_url":"https://api.github.com/repos/magento/graphql-ce/deployments","created_at":"2018-04-04T14:38:53Z","updated_at":"2018-05-17T19:57:39Z","pushed_at":"2018-05-17T18:09:07Z","git_url":"git://github.com/magento/graphql-ce.git","ssh_url":"git@github.com:magento/graphql-ce.git","clone_url":"https://github.com/magento/graphql-ce.git","svn_url":"https://github.com/magento/graphql-ce","homepage":"","size":341536,"stargazers_count":16,"watchers_count":16,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":30,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":6,"open_issues":30,"watchers":16,"default_branch":"2.3-develop"}},"_links":{"self":{"href":"https://api.github.com/repos/magento/graphql-ce/pulls/12"},"html":{"href":"https://github.com/magento/graphql-ce/pull/12"},"issue":{"href":"https://api.github.com/repos/magento/graphql-ce/issues/12"},"comments":{"href":"https://api.github.com/repos/magento/graphql-ce/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/magento/graphql-ce/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/magento/graphql-ce/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/magento/graphql-ce/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/magento/graphql-ce/statuses/d804babe4d2c5cf71e0c46b72221f566df24978b"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"paliarush"}}