{"action":"created","comment":{"url":"https://api.github.com/repos/wp-graphql/wp-graphql/pulls/comments/230858134","pull_request_review_id":171692065,"id":230858134,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMDg1ODEzNA==","diff_hunk":"@@ -0,0 +1,84 @@\n+<?php\n+\n+namespace WPGraphQL\\Type;\n+\n+use WPGraphQL\\Data\\DataSource;\n+\n+register_graphql_object_type( 'ThemeMods', [\n+\t'description' => __( 'All of registered theme modifications' ),\n+\t'interfaces'  => [ WPObjectType::node_interface() ],\n+\t'fields'  => [\n+\t\t'background' => [ \n+\t\t\t'type' \t\t\t=> 'MediaItem',\n+\t\t\t'description'\t=> __( 'custom background' ),\n+\t\t\t'resolve'\t\t=> function( $root, $args, $context, $info ) {\t\n+\t\t\t\tif( ! empty( $root['background'] ) ) { \n+\t\t\t\t\treturn ( ! empty( $root['background']['id'] ) ) ?\n+\t\t\t\t\tDataSource::resolve_post_object( absint( $root['background']['id'] ), 'attachment' ) :\n+\t\t\t\t\tnull;\n+\t\t\t\t}\n+\n+\t\t\t\treturn null;\n+\t\t\t}\n+\t\t],\n+\t\t'backgroundColor' => [ \n+\t\t\t'type' \t\t\t=> 'String',\n+\t\t\t'description'\t=> __( 'background color' ),\n+\t\t\t'resolve'\t\t=> function( $root, $args, $context, $info ) {\n+\t\t\t\treturn ( ! empty( $root['background_color'] ) ) ? $root['background_color'] : null;\n+\t\t\t}\n+\t\t],\n+\t\t'customCssPostId' => [ \n+\t\t\t'type' \t\t\t=> 'Int',\n+\t\t\t'description'\t=> __( 'custom theme logo' ),\n+\t\t\t'resolve'\t\t=> function( $root, $args, $context, $info ) {\n+\t\t\t\treturn ( ! empty( $root['custom_css_post_id'] ) ) ? $root['custom_css_post_id'] : null;\n+\t\t\t}\n+\t\t],\n+\t\t'customLogo' => [ \n+\t\t\t'type' \t\t\t=> 'Int',\n+\t\t\t'description'\t=> __( 'WP ID of customLogo mediaItem' ),\n+\t\t\t'resolve'\t\t=> function( $root, $args, $context, $info ){\n+\t\t\t\treturn ( ! empty( $root['custom_logo'] ) ) ? absint( $root['custom_logo'] ) : null;\n+\t\t\t}\n+\t\t],\n+\t\t'headerImage' => [ \n+\t\t\t'type' \t\t\t=> 'MediaItem',\n+\t\t\t'description'\t=> __( 'custom header image' ),\n+\t\t\t'resolve'\t\t=> function( $root, $args, $context, $info ){\n+\t\t\t\tif( ! empty ( $root['header_image'] ) ) {\n+\t\t\t\t\treturn ( ! empty( $root['header_image']['id'] ) ) ?\n+\t\t\t\t\tDataSource::resolve_post_object( absint( $root['header_image']['id'] ), 'attachment' ) :\n+\t\t\t\t\tnull;\n+\t\t\t\t}\n+\t\t\t\t\n+\t\t\t\treturn null;\n+\t\t\t},\n+\t\t],\n+\t\t'navMenu' => [","path":"src/Type/Object/ThemeMods.php","position":58,"original_position":58,"commit_id":"592f0e728ad5232d7e07d15ecb8b880294aa8e05","original_commit_id":"592f0e728ad5232d7e07d15ecb8b880294aa8e05","user":{"login":"kidunot89","id":13604318,"node_id":"MDQ6VXNlcjEzNjA0MzE4","avatar_url":"https://avatars2.githubusercontent.com/u/13604318?v=4","gravatar_id":"","url":"https://api.github.com/users/kidunot89","html_url":"https://github.com/kidunot89","followers_url":"https://api.github.com/users/kidunot89/followers","following_url":"https://api.github.com/users/kidunot89/following{/other_user}","gists_url":"https://api.github.com/users/kidunot89/gists{/gist_id}","starred_url":"https://api.github.com/users/kidunot89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kidunot89/subscriptions","organizations_url":"https://api.github.com/users/kidunot89/orgs","repos_url":"https://api.github.com/users/kidunot89/repos","events_url":"https://api.github.com/users/kidunot89/events{/privacy}","received_events_url":"https://api.github.com/users/kidunot89/received_events","type":"User","site_admin":false},"body":"Edge data in `header_image` and `background_image` mods stored and can be updated in mutations but can not be queried at the moment. ","created_at":"2018-11-05T18:21:12Z","updated_at":"2018-11-05T18:21:12Z","html_url":"https://github.com/wp-graphql/wp-graphql/pull/571#discussion_r230858134","pull_request_url":"https://api.github.com/repos/wp-graphql/wp-graphql/pulls/571","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/wp-graphql/wp-graphql/pulls/comments/230858134"},"html":{"href":"https://github.com/wp-graphql/wp-graphql/pull/571#discussion_r230858134"},"pull_request":{"href":"https://api.github.com/repos/wp-graphql/wp-graphql/pulls/571"}}},"pull_request":{"url":"https://api.github.com/repos/wp-graphql/wp-graphql/pulls/571","id":228232991,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4MjMyOTkx","html_url":"https://github.com/wp-graphql/wp-graphql/pull/571","diff_url":"https://github.com/wp-graphql/wp-graphql/pull/571.diff","patch_url":"https://github.com/wp-graphql/wp-graphql/pull/571.patch","issue_url":"https://api.github.com/repos/wp-graphql/wp-graphql/issues/571","number":571,"state":"open","locked":false,"title":"Refactored feature theme mods","user":{"login":"kidunot89","id":13604318,"node_id":"MDQ6VXNlcjEzNjA0MzE4","avatar_url":"https://avatars2.githubusercontent.com/u/13604318?v=4","gravatar_id":"","url":"https://api.github.com/users/kidunot89","html_url":"https://github.com/kidunot89","followers_url":"https://api.github.com/users/kidunot89/followers","following_url":"https://api.github.com/users/kidunot89/following{/other_user}","gists_url":"https://api.github.com/users/kidunot89/gists{/gist_id}","starred_url":"https://api.github.com/users/kidunot89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kidunot89/subscriptions","organizations_url":"https://api.github.com/users/kidunot89/orgs","repos_url":"https://api.github.com/users/kidunot89/repos","events_url":"https://api.github.com/users/kidunot89/events{/privacy}","received_events_url":"https://api.github.com/users/kidunot89/received_events","type":"User","site_admin":false},"body":"### Your checklist for this pull request\r\nThanks for sending a pull request! Please make sure you click the link above to view the contribution guidelines, then fill out the blanks below.\r\n\r\n🚨Please review the [guidelines for contributing](../CONTRIBUTING.md) to this repository.\r\n\r\n- [x] Make sure you are making a pull request against the **develop branch** (left side). Also you should start *your branch* off *our develop*.\r\n- [x] Make sure you are requesting to pull request from a **topic/feature/bugfix branch** (right side). Don't pull request from your master!\r\n\r\nWhat does this implement/fix? Explain your changes.\r\n---------------------------------------------------\r\nImplements `ThemeMods` queries and mutations. Tests included.\r\n\r\n\r\nDoes this close any currently open issues?\r\n------------------------------------------\r\n#513\r\n\r\n\r\nAny relevant logs, error output, GraphiQL screenshots, etc?\r\n-------------------------------------\r\n(If it’s long, please paste to https://ghostbin.com/ and insert the link here.)\r\n\r\n\r\nAny other comments?\r\n-------------------\r\nFeatures:\r\n- Refactored for v0.1.x - register_* API\r\n- Six default theme mods are defined, `background`, `backgroundColor`, `customCssPostId`, `customLogo`, `headerImage`, and `navMenuLocations`.\r\n- Filters can be used to define more theme mods. \r\n\r\nWhere has this been tested?\r\n---------------------------\r\n**Operating System:** Ubuntu 18.04\r\n\r\n**WordPress Version:** 4.9.8","created_at":"2018-11-05T03:41:31Z","updated_at":"2018-11-05T18:21:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"461853aced959e4b76daaebb51698ff7aa5854f1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/wp-graphql/wp-graphql/pulls/571/commits","review_comments_url":"https://api.github.com/repos/wp-graphql/wp-graphql/pulls/571/comments","review_comment_url":"https://api.github.com/repos/wp-graphql/wp-graphql/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wp-graphql/wp-graphql/issues/571/comments","statuses_url":"https://api.github.com/repos/wp-graphql/wp-graphql/statuses/592f0e728ad5232d7e07d15ecb8b880294aa8e05","head":{"label":"kidunot89:refactored-feature-theme-mods","ref":"refactored-feature-theme-mods","sha":"592f0e728ad5232d7e07d15ecb8b880294aa8e05","user":{"login":"kidunot89","id":13604318,"node_id":"MDQ6VXNlcjEzNjA0MzE4","avatar_url":"https://avatars2.githubusercontent.com/u/13604318?v=4","gravatar_id":"","url":"https://api.github.com/users/kidunot89","html_url":"https://github.com/kidunot89","followers_url":"https://api.github.com/users/kidunot89/followers","following_url":"https://api.github.com/users/kidunot89/following{/other_user}","gists_url":"https://api.github.com/users/kidunot89/gists{/gist_id}","starred_url":"https://api.github.com/users/kidunot89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kidunot89/subscriptions","organizations_url":"https://api.github.com/users/kidunot89/orgs","repos_url":"https://api.github.com/users/kidunot89/repos","events_url":"https://api.github.com/users/kidunot89/events{/privacy}","received_events_url":"https://api.github.com/users/kidunot89/received_events","type":"User","site_admin":false},"repo":{"id":139393960,"node_id":"MDEwOlJlcG9zaXRvcnkxMzkzOTM5NjA=","name":"wp-graphql","full_name":"kidunot89/wp-graphql","private":false,"owner":{"login":"kidunot89","id":13604318,"node_id":"MDQ6VXNlcjEzNjA0MzE4","avatar_url":"https://avatars2.githubusercontent.com/u/13604318?v=4","gravatar_id":"","url":"https://api.github.com/users/kidunot89","html_url":"https://github.com/kidunot89","followers_url":"https://api.github.com/users/kidunot89/followers","following_url":"https://api.github.com/users/kidunot89/following{/other_user}","gists_url":"https://api.github.com/users/kidunot89/gists{/gist_id}","starred_url":"https://api.github.com/users/kidunot89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kidunot89/subscriptions","organizations_url":"https://api.github.com/users/kidunot89/orgs","repos_url":"https://api.github.com/users/kidunot89/repos","events_url":"https://api.github.com/users/kidunot89/events{/privacy}","received_events_url":"https://api.github.com/users/kidunot89/received_events","type":"User","site_admin":false},"html_url":"https://github.com/kidunot89/wp-graphql","description":"A GraphQL API for WordPress","fork":true,"url":"https://api.github.com/repos/kidunot89/wp-graphql","forks_url":"https://api.github.com/repos/kidunot89/wp-graphql/forks","keys_url":"https://api.github.com/repos/kidunot89/wp-graphql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kidunot89/wp-graphql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kidunot89/wp-graphql/teams","hooks_url":"https://api.github.com/repos/kidunot89/wp-graphql/hooks","issue_events_url":"https://api.github.com/repos/kidunot89/wp-graphql/issues/events{/number}","events_url":"https://api.github.com/repos/kidunot89/wp-graphql/events","assignees_url":"https://api.github.com/repos/kidunot89/wp-graphql/assignees{/user}","branches_url":"https://api.github.com/repos/kidunot89/wp-graphql/branches{/branch}","tags_url":"https://api.github.com/repos/kidunot89/wp-graphql/tags","blobs_url":"https://api.github.com/repos/kidunot89/wp-graphql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kidunot89/wp-graphql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kidunot89/wp-graphql/git/refs{/sha}","trees_url":"https://api.github.com/repos/kidunot89/wp-graphql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kidunot89/wp-graphql/statuses/{sha}","languages_url":"https://api.github.com/repos/kidunot89/wp-graphql/languages","stargazers_url":"https://api.github.com/repos/kidunot89/wp-graphql/stargazers","contributors_url":"https://api.github.com/repos/kidunot89/wp-graphql/contributors","subscribers_url":"https://api.github.com/repos/kidunot89/wp-graphql/subscribers","subscription_url":"https://api.github.com/repos/kidunot89/wp-graphql/subscription","commits_url":"https://api.github.com/repos/kidunot89/wp-graphql/commits{/sha}","git_commits_url":"https://api.github.com/repos/kidunot89/wp-graphql/git/commits{/sha}","comments_url":"https://api.github.com/repos/kidunot89/wp-graphql/comments{/number}","issue_comment_url":"https://api.github.com/repos/kidunot89/wp-graphql/issues/comments{/number}","contents_url":"https://api.github.com/repos/kidunot89/wp-graphql/contents/{+path}","compare_url":"https://api.github.com/repos/kidunot89/wp-graphql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kidunot89/wp-graphql/merges","archive_url":"https://api.github.com/repos/kidunot89/wp-graphql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kidunot89/wp-graphql/downloads","issues_url":"https://api.github.com/repos/kidunot89/wp-graphql/issues{/number}","pulls_url":"https://api.github.com/repos/kidunot89/wp-graphql/pulls{/number}","milestones_url":"https://api.github.com/repos/kidunot89/wp-graphql/milestones{/number}","notifications_url":"https://api.github.com/repos/kidunot89/wp-graphql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kidunot89/wp-graphql/labels{/name}","releases_url":"https://api.github.com/repos/kidunot89/wp-graphql/releases{/id}","deployments_url":"https://api.github.com/repos/kidunot89/wp-graphql/deployments","created_at":"2018-07-02T05:18:12Z","updated_at":"2018-08-14T03:05:24Z","pushed_at":"2018-11-05T04:02:38Z","git_url":"git://github.com/kidunot89/wp-graphql.git","ssh_url":"git@github.com:kidunot89/wp-graphql.git","clone_url":"https://github.com/kidunot89/wp-graphql.git","svn_url":"https://github.com/kidunot89/wp-graphql","homepage":"https://www.wpgraphql.com","size":16729,"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":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"next"}},"base":{"label":"wp-graphql:develop","ref":"develop","sha":"e432480addaebc240dbdd4ae393097b409a1f898","user":{"login":"wp-graphql","id":24994409,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0OTk0NDA5","avatar_url":"https://avatars0.githubusercontent.com/u/24994409?v=4","gravatar_id":"","url":"https://api.github.com/users/wp-graphql","html_url":"https://github.com/wp-graphql","followers_url":"https://api.github.com/users/wp-graphql/followers","following_url":"https://api.github.com/users/wp-graphql/following{/other_user}","gists_url":"https://api.github.com/users/wp-graphql/gists{/gist_id}","starred_url":"https://api.github.com/users/wp-graphql/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wp-graphql/subscriptions","organizations_url":"https://api.github.com/users/wp-graphql/orgs","repos_url":"https://api.github.com/users/wp-graphql/repos","events_url":"https://api.github.com/users/wp-graphql/events{/privacy}","received_events_url":"https://api.github.com/users/wp-graphql/received_events","type":"Organization","site_admin":false},"repo":{"id":72453516,"node_id":"MDEwOlJlcG9zaXRvcnk3MjQ1MzUxNg==","name":"wp-graphql","full_name":"wp-graphql/wp-graphql","private":false,"owner":{"login":"wp-graphql","id":24994409,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0OTk0NDA5","avatar_url":"https://avatars0.githubusercontent.com/u/24994409?v=4","gravatar_id":"","url":"https://api.github.com/users/wp-graphql","html_url":"https://github.com/wp-graphql","followers_url":"https://api.github.com/users/wp-graphql/followers","following_url":"https://api.github.com/users/wp-graphql/following{/other_user}","gists_url":"https://api.github.com/users/wp-graphql/gists{/gist_id}","starred_url":"https://api.github.com/users/wp-graphql/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wp-graphql/subscriptions","organizations_url":"https://api.github.com/users/wp-graphql/orgs","repos_url":"https://api.github.com/users/wp-graphql/repos","events_url":"https://api.github.com/users/wp-graphql/events{/privacy}","received_events_url":"https://api.github.com/users/wp-graphql/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/wp-graphql/wp-graphql","description":"A GraphQL API for WordPress","fork":false,"url":"https://api.github.com/repos/wp-graphql/wp-graphql","forks_url":"https://api.github.com/repos/wp-graphql/wp-graphql/forks","keys_url":"https://api.github.com/repos/wp-graphql/wp-graphql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wp-graphql/wp-graphql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wp-graphql/wp-graphql/teams","hooks_url":"https://api.github.com/repos/wp-graphql/wp-graphql/hooks","issue_events_url":"https://api.github.com/repos/wp-graphql/wp-graphql/issues/events{/number}","events_url":"https://api.github.com/repos/wp-graphql/wp-graphql/events","assignees_url":"https://api.github.com/repos/wp-graphql/wp-graphql/assignees{/user}","branches_url":"https://api.github.com/repos/wp-graphql/wp-graphql/branches{/branch}","tags_url":"https://api.github.com/repos/wp-graphql/wp-graphql/tags","blobs_url":"https://api.github.com/repos/wp-graphql/wp-graphql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wp-graphql/wp-graphql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wp-graphql/wp-graphql/git/refs{/sha}","trees_url":"https://api.github.com/repos/wp-graphql/wp-graphql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wp-graphql/wp-graphql/statuses/{sha}","languages_url":"https://api.github.com/repos/wp-graphql/wp-graphql/languages","stargazers_url":"https://api.github.com/repos/wp-graphql/wp-graphql/stargazers","contributors_url":"https://api.github.com/repos/wp-graphql/wp-graphql/contributors","subscribers_url":"https://api.github.com/repos/wp-graphql/wp-graphql/subscribers","subscription_url":"https://api.github.com/repos/wp-graphql/wp-graphql/subscription","commits_url":"https://api.github.com/repos/wp-graphql/wp-graphql/commits{/sha}","git_commits_url":"https://api.github.com/repos/wp-graphql/wp-graphql/git/commits{/sha}","comments_url":"https://api.github.com/repos/wp-graphql/wp-graphql/comments{/number}","issue_comment_url":"https://api.github.com/repos/wp-graphql/wp-graphql/issues/comments{/number}","contents_url":"https://api.github.com/repos/wp-graphql/wp-graphql/contents/{+path}","compare_url":"https://api.github.com/repos/wp-graphql/wp-graphql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wp-graphql/wp-graphql/merges","archive_url":"https://api.github.com/repos/wp-graphql/wp-graphql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wp-graphql/wp-graphql/downloads","issues_url":"https://api.github.com/repos/wp-graphql/wp-graphql/issues{/number}","pulls_url":"https://api.github.com/repos/wp-graphql/wp-graphql/pulls{/number}","milestones_url":"https://api.github.com/repos/wp-graphql/wp-graphql/milestones{/number}","notifications_url":"https://api.github.com/repos/wp-graphql/wp-graphql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wp-graphql/wp-graphql/labels{/name}","releases_url":"https://api.github.com/repos/wp-graphql/wp-graphql/releases{/id}","deployments_url":"https://api.github.com/repos/wp-graphql/wp-graphql/deployments","created_at":"2016-10-31T16:06:18Z","updated_at":"2018-11-05T09:23:21Z","pushed_at":"2018-11-05T04:02:39Z","git_url":"git://github.com/wp-graphql/wp-graphql.git","ssh_url":"git@github.com:wp-graphql/wp-graphql.git","clone_url":"https://github.com/wp-graphql/wp-graphql.git","svn_url":"https://github.com/wp-graphql/wp-graphql","homepage":"https://www.wpgraphql.com","size":16463,"stargazers_count":862,"watchers_count":862,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":124,"mirror_url":null,"archived":false,"open_issues_count":81,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":124,"open_issues":81,"watchers":862,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/wp-graphql/wp-graphql/pulls/571"},"html":{"href":"https://github.com/wp-graphql/wp-graphql/pull/571"},"issue":{"href":"https://api.github.com/repos/wp-graphql/wp-graphql/issues/571"},"comments":{"href":"https://api.github.com/repos/wp-graphql/wp-graphql/issues/571/comments"},"review_comments":{"href":"https://api.github.com/repos/wp-graphql/wp-graphql/pulls/571/comments"},"review_comment":{"href":"https://api.github.com/repos/wp-graphql/wp-graphql/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wp-graphql/wp-graphql/pulls/571/commits"},"statuses":{"href":"https://api.github.com/repos/wp-graphql/wp-graphql/statuses/592f0e728ad5232d7e07d15ecb8b880294aa8e05"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"kidunot89"}}