graphpinator

Easy-to-use & Fast GraphQL server implementation for modern PHP. Includes features from latest draft, middleware directives and modules with extra functionality.

MIT License

Downloads
14.6K
Stars
38

Bot releases are hidden (Show)

graphpinator - 1.0 rc6 build 2

Published by peldax over 3 years ago

  • Fixed & added new exception on invalid type (for typesystem directives)
graphpinator - 1.0 rc6

Published by peldax over 3 years ago

  • Reworked directive system
    • Changed internal structure for executable directives, for more future extensibility
    • Ability implement custom typesystem directives
      • Refactored constraints and deprecated directive to new structure
    • Directives are now first class citizens in typesystem
  • Moved constraints, where directives and addon types to separate packages
  • Added missing Float input coercion (int is also accepted)
  • Improved printing of some scalar values
    • Float preserves zero fraction
    • Slashes and unicode are not escaped in strings
  • Scalars in Container are singletons
graphpinator - 1.0 rc5

Published by peldax over 3 years ago

  • EnumType::fromConstants
    • Dropped support for array constants for declaring both enum value and description.
    • Description is now loaded from constant's doc comment.
  • Small fixes in UploadModule
graphpinator - 1.0 rc4

Published by peldax over 3 years ago

  • Input type DTOs
    • Ability to recieve data to resolvers in user defined classes instead of stdClass.
graphpinator - 1.0 rc3

Published by peldax almost 4 years ago

  • Added forgotten printing of descriptions for directives
  • Small internal changes
graphpinator - 1.0 rc2

Published by peldax almost 4 years ago

  • Fixed printing of Enum value (value was placed in quotes, but should be unqouted)
  • Added validation of unbreakable Input cycles (new requirement in GraphQL draft spec)
  • Few fixes and internal improvements
graphpinator - 1.0 rc1

Published by peldax almost 4 years ago

  • Raised minimal PHP version to 8
    • Improves overall code quality and finally allows to add typehints on few rare places where it was not possible before
    • 0.25.x with PHP 7.4 is still supported
  • Fully reworked normalisation of values
    • In previous versions values were validated late - during query execution, which is not a great solution. It also does not comply to GraphQL specs.
  • Fully reworked modules
    • Added four different hooks into execution pipeline, instead of only one. Its is also possible to skip and replace some of the pipeline steps. This allows all new kinds of module functionality - eg. Persisted Queries and Query Cost Validation modules, which are coming soon in future version.
    • This also led to improvements and code cleanup in Upload module.
  • Enhanced directives
    • Added afterResolve function and renamed current resolve to beforeResolve. This allows directives to not only do something before field resolution, but also do something after and work with the resolved value.
    • Added option for directives to validate type on which are used during normalisation.
  • Removed final constructor argument for Field (arguments)
    • Its is now required to use setter method with fluent interface
    • Added static method Field::create in order to improve ergonomics with fluent interface (Removes ugly parenthesis which are necessary when using keyword new)
  • Removed final constructor argument for Argument (default value)
    • Its is now required to use setter method with fluent interface
    • Added static method Argument::create in order to improve ergonomics with fluent interface (Removes ugly parenthesis which are necessary when using keyword new)
  • Where directives
    • New opt-in executive directives to filter resolved list values.
    • This directive does not replace native filtering, which should be implemented by the GraphQL service. The goal is to save bandwidth when client knows its going to throw the data anyways, in cases where this specific filtering is not supported by the service itself.
  • Moved Tokenizer to separate package
graphpinator - Improved error messages in interface constraint validation

Published by peldax almost 4 years ago

graphpinator - Fixed resolution of lists with nulls

Published by peldax almost 4 years ago

graphpinator - Added duplicate argument exception

Published by peldax almost 4 years ago

graphpinator - Improved error message for unknown input field

Published by peldax almost 4 years ago

graphpinator - Improved value validation flow & messages

Published by peldax almost 4 years ago

  • Improved value validation flow
  • Improved value validation messages, value errors in resolution are not outputed
  • Improved Void type value validation
graphpinator - Fixed objectconstraint::exactlyOne condition in special case

Published by peldax almost 4 years ago

  • Fixed objectConstraint::exactlyOne giving incorrect results when not all conditioned fields included in result
graphpinator - ID input coercion

Published by peldax almost 4 years ago

ID type allows int to be received, but is converted to string. On output, it always needs to be string.

graphpinator - Constraint contravarince/covariance

Published by peldax almost 4 years ago

  • interface contract now validates contravariance of argument constraints and covariance of field constraints
graphpinator - Improved variable and value errors & removed some dead code

Published by peldax almost 4 years ago

graphpinator - Fixed error for fragment on InputType

Published by peldax almost 4 years ago

graphpinator - Normalizer & validation rework, improved spec conformity

Published by peldax almost 4 years ago

  • Existence of fields, arguments, directives, ... is now correctly done during normalisation.
  • Improved field merging - added validation of response shape.
  • Added new interface TypeConditionable which is applied to composite + outputable + named types.
  • Added exception for unknown type/directive.
  • Added exception for variable type which is not inputable.
  • Added exception for fragment type condition which is not TypeConditionable.
graphpinator - Int 32bit cap

Published by peldax almost 4 years ago

  • added cap to Int type - specification explicitly requires it to be 32 bit
  • added new addon type - BigInt - which does not have this limit and is architecture dependant - most likely 64bit
graphpinator - Parser error improvements

Published by peldax almost 4 years ago

  • All parser errors have location in source
  • "Expected" category of parser errors print what they got instead.
  • Added lowercase operation names (query, mutation, subscription) into reserved keywords.
    • Arguments, fields or types should not be named after them as they now cannot be referenced from query
    • Only lowercase words are reserved - capitalised type names like Query are working properly
    • It is breaking change, but it was done because specification clearly mentions those words as keywords.
  • Internal improvements.