Skip to content

Releases: wp-graphql/wp-graphql

v0.1.3

04 Dec 21:51
4e4934b
Compare
Choose a tag to compare
v0.1.3 Pre-release
Pre-release

Release Notes

New Features

  • added resetUserPassword mutation – thanks @kellenmace
  • added sendPasswordResetEmail mutation – thanks @kellenmace

Bug Fixes

  • Update logo in README.md
  • fixed #528 (generalSettings.startOfWeek throwing an error) – thanks @davidatwhiletrue
  • fixes #578, restores the graphql_input_fields filter – thanks @chriszarate
  • fixes #598, allows search results of Terms and Posts to include children (default was only objects with no parent).

v0.1.2

23 Nov 15:46
69a28cf
Compare
Choose a tag to compare
v0.1.2 Pre-release
Pre-release

Release Notes

  • Update docker environment
  • Fix bug with TermObject children missing for hierarchical Taxonomies

v0.1.1

01 Nov 05:13
e432480
Compare
Choose a tag to compare
v0.1.1 Pre-release
Pre-release

Release Notes

  • Fixes critical bug in Type/Object/PostObject.php that was causing issues with media items
  • Updates Docker configs to make it easier and faster to run tests in the Docker environment between changes

v0.1.0

30 Oct 22:05
ffed4e3
Compare
Choose a tag to compare
v0.1.0 Pre-release
Pre-release

Release Notes

New Registration API

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.

BREAKING:

Deprecated hooks & filters

Some filters and hooks have been removed, intentionally, because they were redundant.

  • graphql_root_queries: this filter has been removed. The RootQuery type is an ObjectType and already inherits the filters established in WPObjectType, so to add fields to the RootQuery, one could use the 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_post_object_mutation_input_fields: this filter has been removed. The input fields are simply fields of an InputObjectType, which inherit the filters established in WPObjectType, so to add fields, one can use the filters 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.
  • graphql_comment_mutation_input_fields: See previous note
  • graphql_term_object_mutation_input_fields See above
  • graphql_setting_mutation_input_fields: See above

Changes to various Type names

Moved files / namespaces

v0.0.34

28 Sep 17:00
feaf091
Compare
Choose a tag to compare
v0.0.34 Pre-release
Pre-release

Release Notes

Issues Closed

Docker Revamp (#462)

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!

v0.0.33

16 Aug 14:46
a03c17e
Compare
Choose a tag to compare
v0.0.33 Pre-release
Pre-release

Release Notes:

registerUser mutation

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: "test111@test.com"
    firstName: "New"
    lastName: "User"
  }) {
    clientMutationId
    user {
      id
      userId
      username
      email
      firstName
      lastName
    }
  }
}

Bug fix

  • Change when register_initial_settings is called

v0.0.32

09 Aug 21:52
2831d77
Compare
Choose a tag to compare
v0.0.32 Pre-release
Pre-release

Release Notes

Bug Fixes

  • introduces a new context-less hook 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.

Tests

  • adjusts PostObjectConnectionQueriesTest.php to generate much less data for Post Connection tests, speeding up the tests quite a bit. Thanks @chriszarate!

Composer Updates

Running composer validate presented some suggestions to adjust. This PR adjusts them.

  • Remove version from composer.json
  • Update Licence in composer.json
  • Update composer.lock

v0.0.31

01 Aug 05:49
6357bbd
Compare
Choose a tag to compare
v0.0.31 Pre-release
Pre-release

Release Notes:

  • Adjust the hooks for where register_initial_settings and setup_types occur to make sure core post_types are fully setup before building the Schema.
  • Adjust the 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
  • have the DataSource::resolve_post_object() method run setup_postdata() to make sure the Post is passing proper context down to it's resolvable fields.

v0.0.30

23 Jul 20:37
602dc72
Compare
Choose a tag to compare
v0.0.30 Pre-release
Pre-release

Release Notes

User Role Queries

  • You can now query for user role info using GraphQL!
  • The following rootQueries now exist: userRole and userRoles
  • example:
query GetUserRoles {
  userRoles {
    edges {
       node {
           name
           id
        }
     }
  }
}

Comment Mutations

  • You can now mutate comments!
  • The following root mutations are now available: createComment, deleteComment, updateComment, restoreComment

Menu Queries

  • You can now query for menus (and menuItems)!
  • The following root queries exist now: menu, menus, menuItem, menuItems
  • example:
query GetMenuItems {
  menuItems {
    edges { 
       node {
          menuItemId
          connectedObject {
             ... on Post {
                title
                postId
             }
             ... on Category {
                name
                categoryId
             }
          }
       }
    }
  }
}

New Docker Environment!

  • You can now easily launch a Docker environment for developing with/for WPGraphQL. At the root of the plugin is a docker-compose.dev.yml file with further instructions outlined on usage.

Misc changes / bug fixes

  • update .gitignore to ignore .vscode files and phpunit.xml
  • update bin/install-wp-tests.sh to allow for overriding the $DB_USERwhen setting up tests
  • fixed a bug with $request variables not working right in one of the hooks
  • fixed a bug with apply_filters( 'the_title' ) being applied incorrectly
  • WPUnionType introduced (in favor of GraphQL/UnionType)
  • fixed bug with sourceUrl not properly being returned when querying for sizes on a mediaItem
  • made graphql_init a pluggable function allowing for it to be initialized externally once only for themes/plugins that include it in their codebase

BREAKING CHANGES:

  • removed filter graphql_type_config in favor of graphql_wp_object_type_config
  • removed filter graphql_comment_author_union_possible_types in favor of the centralized filter graphql_wp_union_type_config in the new WPUnionType
  • removed filter graphql_post_object_union_possible_types in favor of the centralized filter graphql_wp_union_type_config in the new WPUnionType
  • removed filter graphql_term_object_union_possible_types in favor of the centralized filter graphql_wp_union_type_config in the new WPUnionType

Thanks for contributing to this release @chriszarate @CodeProKid @ElisaMassafra @timhanlon @natewoodbridge @jmlallier @kidunot89!

v0.0.29

24 May 20:59
5b7c1c1
Compare
Choose a tag to compare
v0.0.29 Pre-release
Pre-release

Release Notes

Bug Fixes

  • fixes bug with setting a parent using the parentId input during PostObject mutations
  • fixes a bug with not properly returning errors in JSON when exceptions outside the Router.php execution occur