Skip to content

Releases: overblog/GraphQLBundle

v0.6.0

22 Sep 11:20
Compare
Choose a tag to compare

v0.6.0 (2016-09-22)

Thank you to @adri for the contribution (#64)

Context

When writing resolvers for mutations or queries I often convert exceptions from the business layer into errors or warnings visible to the GraphQL API user. A mutation resolver can look like this:

    public function someMutation($someId)
    {
        try {
            // do something
        } catch (SomethingWentWrong $e) {
            throw new UserError($e->getMessage());
        } catch (AnotherError $e) {
            throw new UserError($e->getMessage());
        } catch (ShouldNotHappen $e) {
            throw new UserError($e->getMessage());
        } catch (\InvalidArgumentException $e) {
            throw new UserError($e->getMessage());
        }
    }

Doing this manually for all mutations adds some bloat. This is the same for REST APIs which is why FOSRestBundle added the exception configuration.

What has been done

  • Added a configuration to map exceptions that should be displayed as warnings or errors
  • Added unit tests for the configuration
  • Added a functional test
  • Wrote documentation in the readme how to use it

How to test

  • For an example how to use it, please see the updated readme

v0.5.0

16 Sep 13:03
Compare
Choose a tag to compare

v0.5.0 (2016-09-16)

#54:

  • connection builder now accepts extra args
  • fix some deprecated error "PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead"
  • graphql route use json like default _format

GraphiQL (#59):

  • Replace npmcdn.com with unpkg.com
  • Fix travis build for nightly and 7.1 versions
  • fix base64 tests
  • Compatible with graphQL specs april 2016 migration
  • Modified Batching to be compatible with react-relay-network-layer

v0.4.0

24 Jun 09:48
Compare
Choose a tag to compare

v0.4.0 (2016-06-24)

  • Removed silent try catching on access resolver ( #53 )
  • GraphiQL and React version can be manage using semantic config. ( #52 #50 )
  • Types mapping validation is more verbose (#40)
  • Relay Connection Egde Type, and Mutation Payload or Input, all generated types can now be referenced in mapping file
  • All Mapped types are now cached like php classes (ease debug)
  • Deprecated field and args builder like a service
  • Fix Union type bug
  • Fastest tests
  • ...

v0.3.0

20 Apr 16:45
Compare
Choose a tag to compare

v0.3.0 (2016-04-20)

  • Fix mutation access control
  • Locked webonyx/graphql 0.6.0
  • ...

v0.2.0

10 Apr 18:22
Compare
Choose a tag to compare

v0.2.0 (2016-04-10)

TODO

v0.1.2

18 Mar 17:12
Compare
Choose a tag to compare

v0.1.2 (2016-03-18)

Override default resolver

  • Default resolver now retrieve property values using the symfony PropertyAccess component.

v0.1.1

11 Mar 10:10
Compare
Choose a tag to compare

v0.1.1 (2016-03-11)

Access Control Optimizations

  • The error message Access denied to this field will be display in case a user trying to access a non authorized field.
  • You can now use access on field using builder.
  • Add Expression language function hasAnyPermission

QA

  • Add tests to cover Expression language service
  • Add tests to cover controllers
  • Add tests to cover Access Control
  • Add scrutinizer config
  • Symplify travis tests

First release

04 Mar 16:53
Compare
Choose a tag to compare
v0.1.0

PHP CS