This file contains hidden or 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
| add_action('graphql_register_types', function() { | |
| $post_types = WPGraphQL::$allowed_post_types; | |
| if (!empty($post_types) && is_array($post_types)) { | |
| foreach($post_types as $post_type) { | |
| $post_type_object = get_post_type_object($post_type); | |
| register_graphql_field($post_type_object->graphql_single_name, 'styledContent', [ | |
| 'type' => 'String', | |
| 'description' => __('The styled elementor content of the page', 'cottontailpress-headless'), | |
| 'resolve' => function($post) { | |
| $content = ''; |
This file contains hidden or 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
| import debugFactory from 'debug'; | |
| import { GraphQLNonNull, parse, valueFromAST, astFromValue } from 'graphql'; | |
| const { omit } = require('graphile-build-pg'); | |
| const debug = debugFactory('graphile-build-pg'); | |
| export default (function PostGraphileNestedMutationPlugin(builder) { | |
| builder.hook('build', build => | |
| build.extend(build, { |
This file contains hidden or 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
| const tsquery = require('pg-tsquery'); | |
| const TSVECTOR_TYPE_ID = 3614; | |
| export const PostGraphileTSVPlugin = (builder) => { | |
| builder.hook('inflection', (inflection, build) => { | |
| return build.extend(inflection, { | |
| fullTextScalarTypeName() { | |
| return 'FullText'; | |
| }, |