Pre-release
Pre-release

@jasonbahl jasonbahl released this Dec 4, 2018

Assets 2

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).
Pre-release
Pre-release

@jasonbahl jasonbahl released this Nov 23, 2018 · 23 commits to master since this release

Assets 2

Release Notes

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

@jasonbahl jasonbahl released this Nov 1, 2018 · 36 commits to master since this release

Assets 2

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
Pre-release
Pre-release

@jasonbahl jasonbahl released this Oct 30, 2018 · 79 commits to master since this release

Assets 2

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

Pre-release
Pre-release

@jasonbahl jasonbahl released this Sep 28, 2018 · 144 commits to master since this release

Assets 2

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!

Pre-release
Pre-release

@jasonbahl jasonbahl released this Aug 16, 2018 · 190 commits to master since this release

Assets 2

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
Pre-release
Pre-release

@jasonbahl jasonbahl released this Aug 9, 2018 · 205 commits to master since this release

Assets 2

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
Pre-release
Pre-release

@jasonbahl jasonbahl released this Aug 1, 2018 · 216 commits to master since this release

Assets 2

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.
Pre-release
Pre-release

@jasonbahl jasonbahl released this Jul 23, 2018 · 226 commits to master since this release

Assets 2

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!

Pre-release
Pre-release

@jasonbahl jasonbahl released this May 24, 2018 · 310 commits to master since this release

Assets 2

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