All Versions
135
Latest Version
Avg Release Cycle
53 days
Latest Release
64 days ago
Changelog History
Page 7
Changelog History
Page 7
-
v0.68.0 Changes
- 🛠 Fix issue where
FieldNamerwas 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
DateTimeobject. Useful when using theArgumentHelper.EntityQueryfor 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 eitherorT - 👍
EntityQueryCompiler(used inArgumentHelper.EntityQuery) supports Enums fieldNamerused in mutations too
💥 Breaking changes
- 🚚 Cleaning up the API. The optional
isNullableargument is removed from theAddField()methods. UseIsNullable(bool)method on theFieldclass or the[GraphQLNotNull]attribute. - 🚚 Cleaning up the API.
fieldNamerargument removed from methods inSchemaProviderandSchemaType. Pass in afieldNamerfunc to the constructor ofSchemaProviderwhich will be used when it is auto creating fields. If you pass it in viaSchemaBuilder.FromObjectit will set it on theSchemaProvidercreated. - 🚚
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
queryoperation as per GraphQL spec if it is the only operation in the request - 💥 Breaking - removed the
authorizeClaimsargument 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
.graphqlschema file now use the multiple line triple-quote""" - 🛠 Fix issue where an
WithService()expression is wrapped in aUnaryExpressionand 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
MutationArgumentsAttributeeither at the class level or the parameter - 🚚
SchemaProvidernow adds a defaultDatescalar type in the schema that maps to/from the C#DateTimeclass. 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
IMutationArgumentsin favor for aMutationArgumentsAttributeon the parameter or the class
- ✂ Removed the empty
-
v0.62.0 Changes
- 👌 Support async mutation methods
-
v0.61.0 Changes
- ➕ Add model validation for mutation arguments. See updated readme
- 🛠 Fix issue with services not correctly being included when the field is used in a fragment