- Breaking change - Multiple
[GraphQLAuthorize]
mean all polcies are required and supplying multiple in a single[GraphQLAuthorize]
mean any - Do not generate an empty mutation type if there are no mutations
- Fix query introspection to output mapped types correctly
- Support multiple queries in a request with the operation name of which one to run - e.g. how GraphiQL handles multiple queries
- Update error messages
- Clean up some APIs -
SchemaType.AddAllFields()
,Field.RequiresAllClaims()
,Field.RequiresAnyClaim()
- Initial support for Authorization and Security in the schema - see updated readme and provide feedback
- Support
fragment
statements in other positions in the query
- Fix error with
EntityQueryType<>
as a field argument not being defined as aString
in introspection
- Fix issue introduced in 0.28 when using the
RequiredField<>
type
- Only convert a string matching a
Guid
when the arg type is aGuid
orGuid?
- Fix issue where a non-required EntityQueryType Filter throw an error if it wasn't supplied
- Better support mutations that return an object, not a list
- Introspection query
__type(name: "")
now correctly returns an object not an array [Description("")]
attributes onenum
fields are now read into the schema- Fix issue where introspection query would have dupelicate types for enum types
ISchemaType.AddAllFields
requires a schema as it can add newly discovered types to that schemaISchemaType.AddAllFields
by default adds newenum
types to the schema if found as a field typeISchemaType.AddAllFields
can (off by default) add new complex types to the schema if found as a field typeSchema.Type<TType>()
now searches byTType
nottypeof(TType).Name
. Allowing you to add a type with a different name but still get the typedSchemaType<T>
back
- Add the ability to add enum types to the schema
- The auto schema builder now adds enum types it finds to the schema by default
- Enum values are referenced by the string value, if using JSON.NET you will want to use
[JsonConverter(typeof(StringEnumConverter))]
- Add
GraphQLNotNullAttribute
to mark fields as not nullable in the graphql schema - By default when generating a
.schema
fileIEnumerable<T>
will generate the element type as not nullable. E.g.[T!]
. UseGraphQLElementTypeNullableAttribute
to mark it that the list can contain null items - Support mapping
decimal
tonumber
- Better support for defining nullable or non-nullable types
- Allow adding a mapping type to a type that already exists in the schema. E.g. you might add an input type
Point
and want to map the dotnet typePoint
to it.
- fix issue with required type in an array e.g.
[ID!]
- fix issue with generated required types
- Output fields as required in .graphql schemas
- You can now specify if a field is ignored for queries, mutations or both (if you're sharing DTOs/objects)
- Don't output the meta information of the schema in the schema definition
- Prevent duplicate scalar types in schema generation
- Fix issue where
mutation
keyword could not have any white space before it
- Change, make ENUMs a
Int
type as dotnet serialises them like that - Fix input types missing for the SDL schema generated
- Fix issue where mutation args has repeating
ofType
data in introspection - Fix issue where InputTypes would be duplicated in introspection query results
- Fix issue where
ToList()
was being called deep in expressions causing issues with EF
- Add the ability to add custom scalar types to the schema
- Fix a bug where introspection queries were in correct if you have a List/Array in your mutation type
- Fix a bug where mutation arg objects retained values from previous mutation - i.e if the next call to that mutation didn't provide some optional arguments
QueryObject()
callsToList()
on any lists so if you are using something like EF all queries will be evaluated onQueryObject()
, not just the ones that return a single object (as they callFirstOrDefault()
). This is more consistent, the result contains all your data (regardless of underlying ORM or not) and not a miz of evaluated and non-evaluated.- Add
RemoveTypeAndAllFields()
onMappedSchemaProvider
to more easily clean up a schema that was auto created bySchemaBuilder.FromObject<T>()
- Fix case matching of arguments in mutations. EntityGraphQL defaults to turning dotnet
UpperCaseFieldsAndProperties
tocamelCaseFieldsAndProperties
as this was the intention with the change in 0.18.0 - Enum values are as defined. E.g. if you have an enum
Meter
you can use"Meter"
not"meter"
- map Int16 and UInt16 to Int
- Fix issue where argument names were not case sensitive (the Breaking change introduced in 0.18)
- Fix
kind
in schema introspection query to not have!
- Update dependences (JSON.NET)
- Fix some small casing issues
- Support for schema introspection. Top two fields (
__schema
and__type(name: String!)
) are implemented. There are some things missing where we currently don't support the feature (directives). GraphiQL introspection query executes and you can naviagte the example. Big thanks to @JTravis76 for starting the work. - Implement #18 default argument values in GQL operations
mutation MyMutation($arg: String = "hey defaults") { ... }
- Breaking change - If you purely use
SchemaBuilder.FromObject()
it now creates all field nameslowerCaseCamel
and type namesUpperCamelCase
like the GraphQL defaults. Also since GraphQL is case sensitive I have enforced that. You may need to update some queries to match casing
- Add the option to have other parameters passed into a mutation method. Very useful for IServiceProvider or other services your mutations require
- Fix issue where duplicate fields (say from a query and a fragment) would cause an error
- Bring inner exception details up
- Fix issue where fields that require arguments fail (See Paging example in Demo)
- Add support for full queries on a mutation result. See readme for more details (you return an Expression)
- Initial support for GraphQL fragments. fix #2
- Fix issues with using field arguments deeper in the graph schema
- Add support for
operationName
in theGraphQLRequest
- Add support for graphql comments
- Add GraphiQL web interface to the demo app
- Add
GraphQLIgnore
attribute to ignore a field on a Type for the automatic schema builder - fix bug where it would sometimes try to give an
UInt64
to an argument that required anInt32
- (beta) Add
dotnet gql
command to generate a schema from your current DBContext. See readme for more info
- Add
WhereWhen()
to the extension helpers
- Fix bug in handling converting a string into an enum
- Fix issue looking up types internally when working with anonymous types
- Fix issue with incorrectly checking for generic types
- Fix issue with array types in the dynamically generated type for lambdas
- Fix issue where the generated GraphQL schema had the incorrect type for arrays (e.g. double[])
- Fix issue with
SchemaBuilder.FromObject
building invalid types from arrays.
- Fix an issue where it would generate an invalid field name if we couldn't singularize the name
- Move the query results into a
QueryResult
class so it is easier to work with
- Fix #11 - failure to use
RequiredField
with types likeuint
- it would try to initialise it with anint
- Remove old code that supported multiple fields with the same name and different arguments. GrpahQL doesn't support that and it caused a bug where it would sometimes not find the field you want. You can implment optional arguments and build a complex field like
schemaProvider.AddField("myField", new {name = (string)null, id = (Guid?)null}, (db, param) => param.id.HasValue ? db.MyEntities.Where(l => l.Id == param.id).FirstOrDefault() : db.MyEntities.Where(l => l.Name == param.name).FirstOrDefault(), "Returns an Entity object by ID or a match on the name argument");
- Allow user to supply a type mapping for the generated GraphQL schema
- Fix an issue where we would some time identify a type as IEnumerable when it shouldn't have been
- Allow
ReplaceField
on a sub type
- Convert enums correctly
- Fix SchemaGenerator to support arrays better
- Support turning
QueryRequest
variables from JSON objects into their requied objects
- Bring back
ReplaceField
as technically GraphQL doesn't support overloading, so if you're using tools like Apollo etc to generate code you need to only have unique fields - Added
GetGraphQLSchema
on the schema to return a.graphql
schema file for input into tools like Apollo codegen - Add the option to add descriptions to Mutations
- Fix issue where operation name with no arguments failed
- Breaking change: Strings are now defined by double quotes
"
to fit in with GraphQL better - Added support to use a LINQ-style language as a argument in GraphQL. E.g the following GQL field,
{ users(filter: "active = true and age > 20") { id name } }
can be defined withschema.AddField("users", new {filter = EntityQuery<User>()}, (ctx, p) => ctx.Users.Where(p.filter), "Return filtered users")
. Letting you write that filter using any fields defined on theUser
object - Add
null
/empty
constant for checking for null in EQL
- Fix bug converting Int values to double? values
- Support field "overloads" - fields with same name and different arguments.
- Renamed package EntityGraphQL to emphasizes that it implements GraphQL
- Fix issue with arrays and objects in variables parameter on the request
- Better error messages when GraphQL arguments can't be mapped to an object
- Validate required variables in operations are supplied in the variables dictionary
- Fix potential issue with selecting sub object graphs
- Change the errors to appear in
errors
key along sidedata
key as per GraphQL - Fix an issue when selecting fields from a mutation result
- Support selecting an object that may be null
{ person {name} }
person
will be null if it does not exist
- Parameter types can be optional (no
!
)
- Fix type issues with mutation args
- Change auto entity call with
id:
(e.g.{ entity(id: 13)}
) to call theFirst()
method last - Fix issue with selecting a one-to-one relation in a query
- Fix a issue where schema and metrhod provider were not being passed down in
QueryObject
- Add initial support for Mutations
,
between fields is optional like in GraphQL- Support
__typename
metadata
Moved EntityQueryLanguage.DataApi
namespace toEntityQueryLanguage.GraphQL
to better communicate that its intent is to support- Add support GraphQL arguments in fields. See updated readme
- By default
SchemaBuilder.FromObject<TType>()
generates a non-pural field for any type with a publicId
property, with the argument name ofid
. E.g. A fieldpeople
that returns aIEnumerable<Person>
will result in aperson(id)
field - Move results to field
data
in the resulting object to match GraphQL - Support the
query
keyword for graphql
- Added support for complex nested queries when using the
EFRelationshipHandler
- Fix type caching issue causing exception on changing a sub query