Repository navigation
Releases: EntityGraphQL/EntityGraphQL
Releases · EntityGraphQL/EntityGraphQL
Release list
5.6.0
Changes
- Added additional framework target
net9.0 ResolveWithServiceandResolveWithServicesmethods are now marked obsolete. Please useResolvein the same way- #430 -
MapGraphQLhas new parameterfollowSpecwhich changes the behavior to follow https://github.com/graphql/graphql-over-http/blob/main/spec/GraphQLOverHTTP.md and isfalseby default in v5.x. If set totrueit will follow the spec, the major change being that if the HTTP request was valid you'll get a200status code even if there may be GraphQL errors in the response. Note this will be the default behavior in version v6. - Add
IsNullableto theIFieldinterface to control setting the nullability of the field return type in the schema
Fixes
- #435 - fix
isAny()infilter - 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
nullwhen usingnullto 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
Fixes
- #432 - filter expression was incorrectly using bit-wise OR or OrElse
5.5.2
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. makingctx.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
5.5.0
Changes
- Add
IgnoreAttributestoSchemaBuilderOptions- 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 toobject?to avoid warnings when returning a valid nullable service call etc.- Add support for using a
structtype as an object type in the schema, allowing you to query the fields on it. Previously it only worked if you added thestructas a Scalar Type - #419 - Add support for using
isAny([])on nullable types
Fixes
5.4.6
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
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
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
Fixes
- #399 - Serialize
nullvalues if the field is requested as per the GraphQL spec - Make sure the naming policy set in
DefaultGraphQLResponseSerializeris used for all fields