Skip to content

Releases: EntityGraphQL/EntityGraphQL

5.6.0

Choose a tag to compare

@lukemurray lukemurray released this 29 Jan 08:51

Changes

  • Added additional framework target net9.0
  • ResolveWithService and ResolveWithServices methods are now marked obsolete. Please use Resolve in the same way
  • #430 - MapGraphQL has new parameter followSpec which changes the behavior to follow https://github.com/graphql/graphql-over-http/blob/main/spec/GraphQLOverHTTP.md and is false by default in v5.x. If set to true it will follow the spec, the major change being that if the HTTP request was valid you'll get a 200 status code even if there may be GraphQL errors in the response. Note this will be the default behavior in version v6.
  • Add IsNullable to the IField interface to control setting the nullability of the field return type in the schema

Fixes

  • #435 - fix isAny() in filter
  • Fix issue selecting fields from an object a service field returns where the GraphQL field name differs from the dotnet property name.

Example a field that returns a User type using a service and you are changing the field names in the schema like below

schema.Type<User>().AddField("username", u => u.Name, "Username")
  • #439 - Fix using fields / properties with key words (null, true, false) at the start of the name in the filter expressions
  • Related to #430 - Make sure if the schema says a field is not nullable, that it is not returned as null when using null to exit a mutation or field on error.
  • Fix issue where an expression extracted from a service field may clash with a existing field name

New Contributors

Full Changelog: 5.5.3...5.6.0

5.5.3

Choose a tag to compare

@lukemurray lukemurray released this 24 Nov 23:32

Fixes

  • #432 - filter expression was incorrectly using bit-wise OR or OrElse

5.5.2

Choose a tag to compare

@lukemurray lukemurray released this 15 Nov 02:42

Fixes

  • #418 - Fix issue where field expressions using ctx.Entities.FirstOrDefault(<filter>) (First*, Last*, Single* methods with a filter) would duplicate the filter expression on each execution (e.g. making ctx.Entities.Where(<filter>).Where(<filter>).FirstOrDefault()). This also caused EntityFramework not to use it's cache for the expression
  • Fix issue with RequiresAnyRole() being called on a field with multiple roles added them as requiring all those roles vs. any role. This did not effect the [GraphQLAuthorize] attribute

5.5.1

Choose a tag to compare

@lukemurray lukemurray released this 14 Nov 02:11

Fixes

  • #425 - As per GraphQL Spec, Interfaces are not supported for Input Types
  • #426 - Fix custom directives with no arguments.
  • #427/#428 - Fix issue with connection style paging field extension when using last and before arguments

5.5.0

Choose a tag to compare

@lukemurray lukemurray released this 25 Oct 21:33

Changes

  • Add IgnoreAttributes to SchemaBuilderOptions - A list of Attribute types which will cause the builder to ignore the field/property when building the schema. These are additional to GraphQLIgnoreAttribute
  • .Resolve<>() method on field changes return type to object? to avoid warnings when returning a valid nullable service call etc.
  • Add support for using a struct type as an object type in the schema, allowing you to query the fields on it. Previously it only worked if you added the struct as a Scalar Type
  • #419 - Add support for using isAny([]) on nullable types

Fixes

  • Make sure top level types have access checked (Query, Mutation and Subscription)
  • Fix #392 - Better handle null checks when executing against in-memory data
  • #363 - Only use ToListWithNullCheck when we know we are executing with services, or have been told not to separate the execution.

5.4.6

Choose a tag to compare

@lukemurray lukemurray released this 23 Sep 23:52

Fixes

  • Fix issue with inline arguments for mutation methods not being validated or trying to look for a service. e.g.
[GraphQLMutation]
public static Expression<Func<MyContext, Movie>> AddMovie(
    [Required(ErrorMessage = "Title is required")] string title,
    [Range(1, 100, ErrorMessage = "Price must be between $1 and $100")] decimal price,
    [StringLength(5, ErrorMessage = "Rating must be less than 5 characters")] string rating
)

5.4.5

Choose a tag to compare

@lukemurray lukemurray released this 13 Sep 00:24

Fixes

  • Fix auth not correctly being checked for mutations or subscriptions. Issue was introduced in 5.4.2

Full Changelog: 5.4.4...5.4.5

5.4.4

Choose a tag to compare

@lukemurray lukemurray released this 12 Sep 04:43

Fixes

  • Argument validator was incorrectly traversing types and properties it shouldn't which could cause stack overflows for some types
  • Fix validating inline arguments for mutation methods

Full Changelog: 5.4.3...5.4.4

5.4.3

Choose a tag to compare

@lukemurray lukemurray released this 03 Sep 05:13

Fixes

  • #399 - Serialize null values if the field is requested as per the GraphQL spec
  • Make sure the naming policy set in DefaultGraphQLResponseSerializer is used for all fields

5.4.2

Choose a tag to compare

@lukemurray lukemurray released this 02 Sep 06:19

Fixes

  • #393 - handle DateTimeOffset in filter expressions
  • #398 - make sure user credentials are not cached if using the compiled query cache