Releases: slackhq/hack-graphql
Replace all usages of `elseif` with `else if`
v0.20 Migrate elseif to else if
Add Request/Response interfaces
Releases #115. We expose Request and Response classes to simplify accessing metadata about a request and response. For example, you can easily access the operation name:
$request = GraphQL\Request::build($input, $variables);
$operation_name = $request->getOperationName();
To actually execute a request, use the following:
$request = GraphQL\Request::build($input, $variables);
$response = await $resolver->resolve($request);
return $response->toShape();
Future work could include a Server
class wrapping the above code, and a resolve()
method on IRequest
abstracting away the concrete implementation of $resolver
.
Allow multiple inheritance
Only generate connection objects if connection is annotated with ObjectType
Send more data to hasNextPage/hasPreviousPage
passes more params to hasNextPage/hasPreviousPage which allows for more complex overriding. This is especally necessary when using SQL with graphql. As you have to artificially change the sort order in SQL to retrieve things, thus changing which start or end cursor to use for the next/prev page
also improve efficiency of hasNextPage/hasPreviousPage
Fix bug with sort descending
There is a clever calculation for previous and next page where we pull 1 extra item. However when it is sort descending it ends up removing the first item instead of the extra one it added. This fixes that bug
It also fixes a minor bug where hasPreviousPage and hasNextPage sometimes return null instead of false
Bugfix: Allow non-GraphQL attributes
Bugfix: prevent codegen from breaking if a non-GraphQL class is annotated with an attribute.
Fix bug in ListInputType::assertValidVariableValue
Fixes a bug in ListInputType::assertValidVariableValue
which prevented input types from containing lists of enumerated types.
Allow custom fields on connections
v0.13 format
Another connection codegen fix
What the title says
Fix issue with connections and namespaces
v0.11 Better handling namespaced objects