Skip to content

Releases: silverstripe/silverstripe-graphql

3.5.2

05 Oct 21:23
df61f72
Compare
Choose a tag to compare

What's Changed

Full Changelog: 3.5.1...3.5.2

4.0.0-alpha3

18 Oct 01:25
Compare
Choose a tag to compare

What's Changed

Full Changelog: 4.0.0-alpha2...4.0.0-alpha3

3.5.1: BUGFIX: Replace graceful failure of field access on dataobjects (#399)

11 Aug 00:27
90570dc
Compare
Choose a tag to compare
* BUGFIX: Replace graceful failure of field access on dataobjects

* Revise per steve feedback

4.0.0-alpha2

08 Jun 01:50
7015490
Compare
Choose a tag to compare
  • ENH Remove basic-auth (Steve Boyd) - 0e91cfb
  • NEW Add TestSessionEnvironmentExtension to support behat tests (Steve Boyd) - 2a121e2
  • BUGFIX: Allow mapFieldByClassName to be authoritative (Aaron Carlino) - 0dc90fe
  • MINOR: Improve version constraint for silverstripe/event-dispatcher (Aaron Carlino) - baa89d1
  • MINOR: Update event-dispatcher dependency (Aaron Carlino) - d38230c
  • FIX: NestedInputBuilder correctly builds filters for models with multiple relations of the same type (#363) (Matthias Leutenegger) - a53aea5
  • FIX: input building in cyclic graphs (#371) (Matthias Leutenegger) - eace0fa
  • BUGFIX: insufficient args passed in resolveType (Aaron Carlino) - 8b48b80
  • MINOR: Make paginator injectable (#368) (Aaron Carlino) - fbf75e8
  • MINOR: Remove exclude directive from mutation input types (Aaron Carlino) - 290abb8
  • BUGFIX: Malformed cache instance causing pollution and build errors (Aaron Carlino) - 4011f0d

3.5.0-beta1

10 May 22:41
f8ac3f7
Compare
Choose a tag to compare
3.5.0-beta1 Pre-release
Pre-release
  • API Block older version module from using this minor (#379) (Maxime Rainville) - f8ac3f7
  • MNT Use correct versions (Steve Boyd) - 11e9bad
  • Update build status badge (Steve Boyd) - 2f000b6
  • Removed non-functional scrutinizer badge (Ingo Schommer) - c1db445
  • NEW: Field formatting API, forward compatibility (#313) (Aaron Carlino) - 25f654c

4.0.0 alpha 1

17 Feb 04:20
Compare
Choose a tag to compare

This is the first alpha release of GraphQL 4

Changelog

For more a high-level view of what has changed in GraphQL 4, see the upgrade guide.

Changes since 3 Feb 2021

  • Refactor context provider API so that they now plug into QueryHandlerInterface. They
    can set and get their own context based on their own internal logic. Before:
    $user = $context['currentUser']; after: $user = UserContextProvider::get($context)

  • BuildState API is gone. Use new SchemaContextProvider in resolvers. Pass SchemaContext
    objects to the small number of classes that needed it in their internals.

  • AbstractNestedInputPlugin is gone. This never made any sense to tie something
    so utilitarian to an arbitrary inheritance chain. It has been refactored as NestedInputBuilder
    and is far more single-purpose. No longer concerned with model and field mapping, but rather
    just building recursive input types and adding them to the schema.

  • Refactor QuerySort, QueryFilter to use input builder

  • Field mapping is no longer exhaustively encoded in the resolvers. New
    SchemaContextProvider allows resolvers to look at the schema as persisted to a
    PHP array in the code gen and invoke methods like $schema->mapField($type, $fieldName)

  • No more resolveContext for DataObject\Resolver since field mapping is handled externally now

  • Migrate type Controller::introspectTypes to standalone service (SchemaTranscriber)
    invoked through event dispatcher

  • Remove IntrospectionProvider extension. Static only. Leaving it to the user to decide never made any sense, and it just slowed down the UI in the CMS. Now that we're doing code gen, it seems like the static solution is more consistent.

  • Remove ModelConfigurationProvider: Didn't make any sense. Models are now
    responsible for fetching their own configurations.

  • Remove defaultResolver: Didn't make any sense. Just set a default resolver
    property and allow it to be overridden.

  • Resolver discovery is now lazy to avoid race conditions in config. If resolvers
    are null at code gen time, discovery is invoked and applied.

  • Controller now only accepts a schema key and uses SchemaFactory to boot.

  • Schema::quiet() is gone. Schema is quiet by default to better support autobuilding
    and test suites. Opt into verbose with setVerbose(true).

  • CSRFMiddleware and HTTPMethodMiddleware now rely on new ContextProviders
    to better encapsulate their state concerns.

  • Better error reporting:

    • QueryHandler now pretty prints the stack trace
    • Resolver level errors now throw ResolverFailure which express tons of useful
      context, including the query path, the field, the type, the args, and most importantly,
      the resolver chain. No more guessing which closure failed.
    • ResolverFailure relies on new resolverComposition field in encoded types.
    • Updates to code gen templates to support the above, and other tidiness like
      variable assignment to save code execution and comments to show closing bracket relationships.
  • ComposedResolver is now stateful, mostly for diagnostic purposes. Before:
    ComposedResolver::create(): Closure after: ComposedResolver::create($list)->toClosure()

  • All resolvers use ComposedResolver for consistency, even when no middle/afterwares

  • ComposedResolver no longer needs separate arguments for primary, before, and after
    resolvers. Just a stack that leaves ordering a concern of the code composing the class.
    (this was a @todo annotation FWIW)

  • SchemaModelInterface now must declare getPropertyForField (gql field -> object property mapping)

  • SchemaModelInterface now must declare getSchemaContext and getModelConfiguration

  • New hasNativeField in FieldAccessor helps with knowing what fields are
    filterable/sortable. Basically ORM insight.

  • Fields using the model property (a bit of a polymorphic hack to support
    cases like CMS needing to know what the SiteTree model is named), will
    get just-in-time assignment before code generation time to prevent race conditions
    in the config.

  • New suite of relational FakeProduct objects for testing nested queries, filters, mutations.

  • New top-to-bottom integration test that creates, updates, and reads nested data structures with filters/sorting, field aliases, etc.

  • NB: CodeGenerationStore is now responsible for type mapping and field mapping. This
    is a leaky abstraction as it's tightly coupled to SchemaContext now.

  • New StorableSchema layer eliminates unpredictable state of Schema through process(). The readonly value object returned by createStorableSchema() is expected to
    be a complete set of primitive objects that are consumable by a storage service.

  • SchemaFactory is now SchemaBuilder, which has four clearly defined functions, and eliminates the confusion around using Schema at query time:

    • getConfig(string $schemaKey): ?SchemaContext -- Get the cached configuration of a Schema. Useful for resolvers
    • boot(string $schemaKey): Schema -- Load all the configuration in to a Schema object. Useful for the configuration/build process.
    • getSchema(string $schemaKey): ?GraphQLSchema -- Retrieve a queryable graphql-php Schema object from the storage service. Useful at query time.
    • build(Schema $schema, bool $clear = false): GraphQLSchema -- put the Schema through a storage service and return its queryable schema
  • SchemaStorageInterface is now the concern of SchemaBuilder rather than Schema, which results in a diminished API surface for Schema.

  • Validation of Schema moved to StorableSchema, as this is the only time the schema truly needs to be valid (before storage)

  • Type/field mapping done just-in-time for schema storage

  • Prefer event dispatcher over extend() hooks in controller

  • SchemaContext is now SchemaConfig

  • Schema has new getState() for persisting state during build

  • Improved handling of "empty" schemas that shouldn't be built, but also shouldn't error (e.g. default out of the box)

3.2.3

08 Apr 03:00
bee37b7
Compare
Choose a tag to compare
MINOR: add result to onAfterMiddlware hook (#258)

3.2.1

05 Feb 01:46
0a9913f
Compare
Choose a tag to compare
Merge pull request #243 from silverstripe-terraformers/feature/after-…

0.2.1

28 Feb 03:56
Compare
Choose a tag to compare
API Update graphql to use new config (#81)

0.2.0

28 Feb 03:57
Compare
Choose a tag to compare
Release 0.2.0