All Versions
116
Latest Version
Avg Release Cycle
-
Latest Release
-
Changelog History
Page 5
Changelog History
Page 5
-
v0.68.1 Changes
- โก๏ธ Update Humanizer.Core dependency which resolves issue with newer dotnet core
-
v0.68.0 Changes
- ๐ Fix issue where
FieldNamer
was not being consistently used. Thanks @AnderssonPeter - ๐ Make sure we include inner exceptions on errors. Thanks @AnderssonPeter
- โ Added string and long parsing for DateTime and DateTimeOffset. Thanks @GravlLift
- ๐ Fix issue where
-
v0.67.0 Changes
- As per GraphQL spec commas are optional (previously EntityGraphQL expected them in field/mutation arguments)
๐ฅ Breaking changes
- errors property on query result should not be present on the response if there are no errors per the graphQL specification.
-
v0.66.1 Changes
- ๐ Fix bug with using
WithService()
when you require the schema context service again to create a link between services
- ๐ Fix bug with using
-
v0.66.0 Changes
- When using services other than the schema context in fields (that return a single object not a Enumerable) the methods/services are no longer executed multiple times. (issue #36). Notes below
- When a string matches a date time it will be converted to a
DateTime
object. Useful when using theArgumentHelper.EntityQuery
for advanced filtering. Regex matches"yyyy-MM-dd HH:mm:ss.fffffffzzz"
,"yyyy-MM-dd HH:mm:ss"
,"yyyy-MM-dd"
with the separator between date and time being eitheror
T
- ๐
EntityQueryCompiler
(used inArgumentHelper.EntityQuery
) supports Enums fieldNamer
used in mutations too
๐ฅ Breaking changes
- ๐ Cleaning up the API. The optional
isNullable
argument is removed from theAddField()
methods. UseIsNullable(bool)
method on theField
class or the[GraphQLNotNull]
attribute. - ๐ Cleaning up the API.
fieldNamer
argument removed from methods inSchemaProvider
andSchemaType
. Pass in afieldNamer
func to the constructor ofSchemaProvider
which will be used when it is auto creating fields. If you pass it in viaSchemaBuilder.FromObject
it will set it on theSchemaProvider
created. - ๐
AddCustomScalarType()
removed. Previously marked as obsolete. UseAddScalarType()
Notes of services fix
๐ If you build a field like so
schema.AddField("myField", ctx => WithService((IMyService srv) => srv.DoSomething(ctx))); // Register the service with DI somewhere public class MyService: IMyService { public SomeObject DoSomething(Context ctx) { // do something return data; } }
With a query like
{ myField { field1 field 2 } }
๐ We use to build an expression like so
srv.DoSomething(ctx) == null ? null : new { field1 = srv.DoSomething(ctx).field1, field2 = srv.DoSomething(ctx).field2 }
We now wrap this in a method call that only calls
DoSomething(ctx)
a single time Which looks like this(ctx, srv) => NullCheckWrapper(srv.DoSomething(ctx), parameterValues, selection); // simplifying here // Again a simified example of what NullCheckWrapper does public object NullCheckWrapper(Expression<Func<Context, IMyService>> baseValue, object[] values, LambdaExpression selection) { // null check if (baseValue == null) return null; // build the select on the object var result = selection.Compile().DynamicInvoke(baseValue); }
This works with services used deeper inthe graph too. Example
schema.Type<Person>().AddField("complexField", (person) => DoSomething(person.Id));
GraphQL
{ people { complexField { field1 field1 } } }
The wrapped expression looks like this
(ctx, srv) => ctx.People.Select(person => new { complexField = NullCheckWrapper(srv.DoSomething(person.Id), parameterValues, selection); // simplifying here })
โ This has been tested with EF Core and works well.
-
v0.65.0 Changes
- You can now secure whole types in the schema. Add the
[GraphQLAuthorize("claim-name")]
to the class or useschema.AddType(...).RequiresAllClaims("some-claim")
,schema.AddType(...).RequiresAnyClaim("some-claim")
- โ Add
GetField(Expression<Func<TBaseType, object>>)
overload - operation name is optional for a
query
operation as per GraphQL spec if it is the only operation in the request - ๐ฅ Breaking - removed the
authorizeClaims
argument fromAddField()
. Please usefield.RequiresAllClaims("some-claim")
,field.RequiresAnyClaim("some-claim")
- You can now secure whole types in the schema. Add the
-
v0.64.0 Changes
- ๐ Change - descriptions generated for a
.graphql
schema file now use the multiple line triple-quote"""
- ๐ Fix issue where an
WithService()
expression is wrapped in aUnaryExpression
and we fail to get the lambda
- ๐ Change - descriptions generated for a
-
v0.63.0 Changes
- ๐ฆ Expose a
SchemaProvider.ExecuteQueryAsync()
- ๐ Fix #53 support mutations with no arguments
- With the above fix the context and/or the mutation arguments parameters are optional in your mutation method
- the parameters in the mutation methods are no longer required to follow a position
- ๐
SchemaProvider.AddCustomScalarType()
is deprecated, useAddScalarType
- Directvies are now included in schema introspection
- ๐ Fix #52 - sometimes incorrect types generated for schema intropection or the GraphQL schema file format
- ๐จ Refactor type information held in the schema. This mean return types etc are evaluated at schema creation time not execution. If you add a field that requires a type as an Arg ument or return type, that type must already be in the schema
- You can now provide a field namer function to name the generated fields when using
SchemaBuilder.FromObject()
,ISchemaType.AddAllFields()
orSchemaProvider.PopulateFromContext()
๐ฅ Breaking changes
- The class that represents the mutation arguments must be marked with the
MutationArgumentsAttribute
either at the class level or the parameter - ๐
SchemaProvider
now adds a defaultDate
scalar type in the schema that maps to/from the C#DateTime
class. If you were previously adding that you'll get an error on type existing. UseSchemaProvider.RemoveType<DateTime>()
to remove it and add it with a different name - Type mapping information (
AddTypeMapping()
) are evaluated at schema creation time. You may need to add mappings before creating the rest of your schema
- ๐ฆ Expose a
-
v0.63.0-beta1 Changes
- โ Removed the empty
IMutationArguments
in favor for aMutationArgumentsAttribute
on the parameter or the class
- โ Removed the empty
-
v0.62.0 Changes
- ๐ Support async mutation methods