Bot releases are hidden (Show)
Published by jasonbahl over 5 years ago
TimezoneEnum
type added to the Schemagraphql_menu_item_connection_args
and graphql_menu_item_connection_query_args
filters added to the MenuItemConnectionResolver. Thanks @epeli!MenuLocationEnum
values are determined to include all locations, not just locations with a menu already assigned.Published by jasonbahl over 5 years ago
graphql_request_data
filter causing issues in GET requests. Thanks @epeli!.gitattributes
definitions to exlude files for output to packagist. Thanks @mikelking!categoryNotIn
and tagNotIn
in PostObjectConnection queries. Thanks @craigmcnamara!Access-Control-Max-Age
to the response headers to cache preflight options requests. Thanks @chriszarate!sourceUrl
on the MediaItem
Type to allow for a specific size to be selected. Thanks @hsimah!Published by jasonbahl over 5 years ago
after_execute_actions
in the Request.php classPublished by jasonbahl almost 6 years ago
graphql_request_results
can return data in a different shape than previously returned. If making use of this filter, verify it's working as expected or make appropriate changes for your use case.
do_graphql_request
action now executes after the Schema has been built. In early days this hook was used sometimes to hook in and extend the Schema. If you have anything hooked here that modifies the Schema in some way, try hooking into graphql_get_schema
instead.graphql()
function has been added as an entry point to the Request
class. Ex: $resposne = graphql([ .'query' => '{posts{edges{node{id,title}}}}' ]);
post__in
instead of menu_order
post_by_args
. Thanks @hsimah!
currentConnection
and connectionArgs
down through context to nested fields of a connection. See notes on usage here: https://github.com/wp-graphql/wp-graphql/pull/637
Published by jasonbahl almost 6 years ago
graphql_register_types
hook later in TypeRegistry::init()
to make sure all core Types (including Connections, Unions and Mutations) have all been registered and are available when extending the Schema.Published by jasonbahl almost 6 years ago
resetUserPassword
mutation – thanks @kellenmacesendPasswordResetEmail
mutation – thanks @kellenmacegraphql_input_fields
filter – thanks @chriszaratePublished by jasonbahl almost 6 years ago
Published by jasonbahl almost 6 years ago
Published by jasonbahl almost 6 years ago
Similar to WordPress core register_*
APIs, such as register_post_type
, register_taxonomy
, register_meta
, etc, WPGraphQL now has it's own register_graphql_*
API.
The following regiser_graphql_*
functions are introduced with this release:
register_graphql_type
register_graphql_object_type
register_graphql_input_type
register_graphql_enum_type
register_graphql_union_type
register_graphql_field
register_graphql_fields
register_graphql_schema
register_graphql_connection
register_graphql_mutation
deregister_graphql_field
Docs to come, but for the time being, check the source code to see how things work. Specifically TypeRegistry.php. All Types have been refactored to be registered with these new functions.
Some filters and hooks have been removed, intentionally, because they were redundant.
graphql_RootQuery_fields
filter, or could (recommended) use the new register_graphql_field
or register_graphql_fields
functions to add fields to the root.graphql_UpdatePostInput_fields
or graphql_CreatePostInput_fields
, or (recommended) use the new register_graphql_field
or register_graphql_fields
functions to add fields to the inputs.Input
in their name.Enum
in their nameUnion
in their nameregister_graphql_connection()
function, and therefore all connection types and fields have consistent naming, where before the names were a bit random
RootCommentsCommentArgs
is now RootQueryToCommentConnectionWhereArgs
(see: https://github.com/wp-graphql/wp-graphql/compare/release/v0.1.0?expand=1#diff-00fe868538645d14c1c8af8d3a19bde6)RootCategoriesTermArgs
is now RootQueryToCategoryConnectionWhereArgs
https://github.com/wp-graphql/wp-graphql/compare/release/v0.1.0?expand=1#diff-9d7db44df670461f784357a0a7e3c860L83
WPGraphQL\Data
. If you extend any of the existing resolver classes, you should be able to just update your namespace, such as changing \WPGraphQL\Type\PostObject\Connection\PostObjectConnectionResolver
to \WPGraphQL\Data\PostObjectConnectionResolver
as seen here: https://github.com/wp-graphql/wp-graphql/compare/release/v0.1.0?expand=1#diff-4232742370ce60dbe32afbf8e87e3476L382
Published by jasonbahl about 6 years ago
We were having issues with our Code Coverage reports since switching our testing to a Docker environment.
This release introduces a new Docker setup that effectively runs tests with coverage and utilizes CodeCov for coverage reports. Thanks @mngi-arogers for work on this!
Published by jasonbahl about 6 years ago
We now have a root registerUser
mutation that allows for public users to register as a user on the site. Thanks for working on this @kellenmace!
Example usage:
mutation RegisterUser {
registerUser(input: {
clientMutationId: "registerUser"
username: "newUser"
password: "password"
email: "[email protected]"
firstName: "New"
lastName: "User"
}) {
clientMutationId
user {
id
userId
username
email
firstName
lastName
}
}
}
register_initial_settings
is calledPublished by jasonbahl about 6 years ago
do_action( 'init_graphql_request' )
which fires when a GraphQL request has begun. The use of do_graphql_request
to trigger some actions in certain contexts was causing errors.Running composer validate
presented some suggestions to adjust. This PR adjusts them.
Published by jasonbahl about 6 years ago
register_initial_settings
and setup_types
occur to make sure core post_types are fully setup before building the Schema.wp graphql generate-static-schema
cli command to define the request as a GRAPHQL_REQUEST
and run actions do_graphql_request
and graphql_get_schema
DataSource::resolve_post_object()
method run setup_postdata()
to make sure the Post is passing proper context down to it's resolvable fields.Published by jasonbahl about 6 years ago
userRole
and userRoles
query GetUserRoles {
userRoles {
edges {
node {
name
id
}
}
}
}
createComment
, deleteComment
, updateComment
, restoreComment
menu
, menus
, menuItem
, menuItems
query GetMenuItems {
menuItems {
edges {
node {
menuItemId
connectedObject {
... on Post {
title
postId
}
... on Category {
name
categoryId
}
}
}
}
}
}
docker-compose.dev.yml
file with further instructions outlined on usage..gitignore
to ignore .vscode
files and phpunit.xml
bin/install-wp-tests.sh
to allow for overriding the $DB_USER
when setting up tests$request
variables not working right in one of the hooksapply_filters( 'the_title' )
being applied incorrectlysourceUrl
not properly being returned when querying for sizes
on a mediaItem
graphql_init
a pluggable function allowing for it to be initialized externally once only for themes/plugins that include it in their codebasegraphql_type_config
in favor of graphql_wp_object_type_config
graphql_comment_author_union_possible_types
in favor of the centralized filter graphql_wp_union_type_config
in the new WPUnionTypegraphql_post_object_union_possible_types
in favor of the centralized filter graphql_wp_union_type_config
in the new WPUnionTypegraphql_term_object_union_possible_types
in favor of the centralized filter graphql_wp_union_type_config
in the new WPUnionTypeThanks for contributing to this release @chriszarate @CodeProKid @ElisaMassafra @timhanlon @natewoodbridge @jmlallier @kidunot89!
Published by jasonbahl over 6 years ago
Published by jasonbahl over 6 years ago
graphql_access_control_allow_headers
filterstati
arg to PostObjectConnectionArgsin
, notIn
and parentIn
Published by jasonbahl over 6 years ago
Published by jasonbahl over 6 years ago
Published by jasonbahl over 6 years ago
Making Connections Contextual: #387 made changes to how Connection Types are registered and implemented throughout. Previously, connections were pretty generic, such as PostsConnection
and that connection was a field of the RootQuery and appeared elsewhere like as children of a Post, or connection from TermObjects. . .The flaw in that is that connections should be contextual based on the node it's connecting from and connecting to. So, now, we have connections such as: PostCategoriesConnection
and RootCategoriesConnection
. This allows for each type to execute differently, and provide other conditional attributes like edge data that exists when categories are being queried as a field of a Post vs. when they're being queried for as a Root Query. Same with args on the connections, they can now be added to specific connections, instead of available generally across the board. You can read more about it in #387
shouldOutputInFlatList
and shouldOnlyIncludeConnectedItems
. You can read more about use in #387We've added batch request support in #385! This allows for multiple queries/mutations to be sent in an HTTP request as an array of requests, and they will be processed in one request!
:/endif;
Types::non_null
and Types::list_of
to play nicer with IDEsPublished by jasonbahl almost 7 years ago