Conversation
|
Performance ReportNo Performance Changes Show Full Table
Old Schema Generation: 21.964s |
There was a problem hiding this comment.
As discussed we should test all directive combinations involving groupBy and add it to the invalid directive combination matrix if any is not supported. The matrix should anyway include the groupBy directive, with an empty array if all are supported.
Also, add tests for groupBy on fields of non-primitive types.
On this, does it work with ENUM?
| composer: SchemaComposer; | ||
| }): { type: ObjectTypeComposer; args: ObjectTypeComposerArgumentConfigMapDefinition } | undefined { | ||
| const typeName = entityAdapter.operations.getConnectionGroupByTypename(); | ||
| const groupByFields = entityAdapter.groupByFields; |
There was a problem hiding this comment.
this seems unnecessary as it's only used once
| } | ||
|
|
||
| return fieldIsInNodeType(directiveLocationData); | ||
| // || fieldIsInRelationshipPropertiesType(directiveLocationData) |
| /** Defines if the query should project edges */ | ||
| protected shouldProjectEdges(): boolean { | ||
| const hasFields = this.nodeFields.length + this.edgeFields.length > 0; | ||
| const hasFields = this.nodeFields.length + this.edgeFields.length + this.fields.length > 0; |
There was a problem hiding this comment.
this "fields" thing is a bit ambiguous - is there a better way to name it?
| import { Neo4jGraphQL } from "../../../../src"; | ||
| import { formatCypher, formatParams, translateQuery } from "../../utils/tck-test-utils"; | ||
|
|
||
| describe("Group By Directive - Top Level", () => { |
There was a problem hiding this comment.
do we want a tck test for any directive combination, eg groupBy + relationship?
Description
This is a WIP branch for the
groupByfeature, allowing queries to return elements grouped by a certain field.E.g.: