Skip to content

v0.5.0

Compare
Choose a tag to compare
@sogko sogko released this 28 Jan 00:07
· 510 commits to master since this release

This release brings up graphql-go on par with graphql-js v0.5.0 and fully compliant with April 2016 spec.

Note: This release was retroactively added.


Notable changes:

  • 58f2928 [RFC] Proposed change to directive location introspection
  • 2322d25 [RFC] Directives in schema language
    • ❗️Breaking Changes: graphql.NewDirective(*graphql.Directive) => graphql.NewDirective(graphql.DirectiveConfig)
    • Affects those that defined custom directives.
  • 03b92b0 Move getTypeOf to execute.js and rename to defaultResolveTypeFn to mirror defaultResolveFn
    • ❗️Breaking Changes: removed ObjectType(interface{}, ResolveInfo) *Object from Abstract interface, Union and Interface structs and moved to executor
    • Affects those that directly retrieved the ObjectType of an Abstract type (Union / Interface)
  • 79f48da Add GraphQLSchema types field
    • ❗️Breaking Changes:
    • This introduces a breaking change to the Type System API. Now, any individual Interface type does not have the required information to answer GetPossibleTypes or IsPossibleType without knowing the other types in the Schema. These methods were moved to the Schema API, accepting the abstract type as the first parameter.
    • This also introduces a breaking change to the type comparator functions: IsTypeSubTypeOf and DoTypesOverlap which now require a Schema as a first argument.
  • 1e33c35 [RFC] Add explicit context arg to graphql execution
    • ❗️Breaking Changes
    • Removed Schema from ResolveParams, already available in ResolveParams.Info
    • IsTypeOfFn and ResolveTypeFn params are now struct, similar to FieldResolveFn
    • context is now available for resolving types in IsTypeOfFn and ResolveTypeFn, similar to FieldResolveFn
  • a241e1c RFC: Return type overlap validation
  • e23ac77 Add Schema Definition to IDL.

Changes to public/exported vars / func

Previous New Risk
graphql.NewDirective(*graphql.Directive) graphql.NewDirective(graphql.DirectiveConfig) Low-Medium
graphql.Abstract.ObjectType(interface{}, ResolveInfo) *Object removed Low-Medium
graphql.Union.ObjectType(interface{}, ResolveInfo) *Object removed Low-Medium
graphql.Interface.ObjectType(interface{}, ResolveInfo) *Object removed Low-Medium
graphql.IsTypeOfFn(interface{}, ResolveInfo) graphql.IsTypeOfFn(IsTypeOfParams) High
graphql.ResolveTypeFn(interface{}, ResolveInfo) graphql.ResolveTypeFn(ResolveTypeParams) High
graphql.ResolveParams.Schema removed, already available in graphql.ResolveInfo Low-Medium