Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changesets for branch dev #3873

Merged
merged 1 commit into from
Sep 1, 2023
Merged

changesets for branch dev #3873

merged 1 commit into from
Sep 1, 2023

Conversation

neo4j-team-graphql
Copy link
Collaborator

@neo4j-team-graphql neo4j-team-graphql commented Sep 1, 2023

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to dev, this PR will be updated.

Releases

@neo4j/[email protected]

Major Changes

  • #2773 7462b9715 Thanks @angrykoala! - The deprecated @callback directive has been removed. Any remaining usages of @callback should be replaced with @populatedBy. See https://github.com/neo4j/graphql/blob/dev/docs/modules/ROOT/pages/guides/v4-migration/index.adoc#callback-renamed-to-populatedby for more information.

  • #2773 7462b9715 Thanks @angrykoala! - Remove aggregation fields for relationships to a single node (non-List relationships) - these serve no functional utility

  • #2773 7462b9715 Thanks @angrykoala! - The operations argument of @subscription has been renamed to events, with each event being past tense. This mirrors naming used elsewhere for subscriptions.

  • #2773 7462b9715 Thanks @angrykoala! - Support for Neo4j database 4.3 has been dropped. Please use the current Neo4j 5 release, or the LTS 4.4 release.

  • #2773 7462b9715 Thanks @angrykoala! - Aliased properties are now automatically escaped using backticks. If you were using backticks in the property argument of your @alias directives, these should now be removed.

  • #2773 7462b9715 Thanks @angrykoala! - Deprecated @node directive arguments label and additionalLabels have been removed. Please use the labels argument.

  • #2773 7462b9715 Thanks @angrykoala! - Remove nodes and relationships from the public API of the Neo4jGraphQL class.

  • #2773 7462b9715 Thanks @angrykoala! - Specifying Cypher query options to be used is now cypherQueryOptions instead of just queryOptions, and each option accepts a simple string rather than an enum.

  • #2773 7462b9715 Thanks @angrykoala! - Escape properties and relationships if needed, using | and & as part of the label is no longer supported

  • #2773 7462b9715 Thanks @angrykoala! - skipValidateTypeDefs has been removed. Please use startupValidation instead. See https://neo4j.com/docs/graphql-manual/current/guides/v4-migration/#startup-validation

  • #2773 7462b9715 Thanks @angrykoala! - It was possible to define schemas with types that have multiple relationship fields connected by the same type of relationships. Instances of this scenario are now detected during schema generation and an error is thrown so developers are informed to remedy the type definitions.

    An example of what is now considered invalid with these checks:

    type Team {
        player1: Person! @relationship(type: "PLAYS_IN", direction: IN)
        player2: Person! @relationship(type: "PLAYS_IN", direction: IN)
        backupPlayers: [Person!]! @relationship(type: "PLAYS_IN", direction: IN)
    }
    
    type Person {
        teams: [Team!]! @relationship(type: "PLAYS_IN", direction: OUT)
    }

    For more information about this change and how to disable this validation please see the 4.0.0 migration guide

  • #2773 7462b9715 Thanks @angrykoala! - The Neo4j GraphQL Library now only accepts a string, DocumentNode or an array containing these types. A callback function returning these is also accepted. This is a reduction from TypeSource which also included types such as GraphQLSchema and DefinitionNode, which would have resulted in unexpected behaviour if passed in.

  • #2773 7462b9715 Thanks @angrykoala! - Removed deprecated argument plural from @node directive. Please use the @plural directive instead.

  • #2773 7462b9715 Thanks @angrykoala! - Removal of the following exports: Neo4jGraphQLAuthenticationError, Neo4jGraphQLForbiddenError, EventMeta, Neo4jGraphQLAuthPlugin and RelationField. This are either redundant, or internals which shouldn't have been exported.

  • #2773 7462b9715 Thanks @angrykoala! - Remove unused DeleteInfo, GraphQLSortArg, GraphQLOptionsArg and GraphQLWhereArg type exports.

  • #2773 7462b9715 Thanks @angrykoala! - The limit argument of the @queryOptions directive has been moved to its own directive, @limit.

  • #2773 7462b9715 Thanks @angrykoala! - Programmatic toggling of debug logging is now done using the debug option of the constructor.

  • #2773 7462b9715 Thanks @angrykoala! - Change subscriptions setup, this requires changes to constructor options passed to Neo4jGraphQL. See https://neo4j.com/docs/graphql-manual/current/guides/v4-migration/#subscriptions-options

    For single instance subscriptions use true:

    const neoSchema = new Neo4jGraphQL({
        typeDefs,
        features: {
            subscriptions: true,
        },
    });

    For any other plugin, pass it features.subscriptions:

    const neoSchema = new Neo4jGraphQL({
        typeDefs,
        features: {
            subscriptions: subscriptionPlugin,
        },
    });
  • #2773 7462b9715 Thanks @angrykoala! - The minimum version of neo4j-driver is now 5.8.0, please upgrade. The boomkark field in the selection set has been marked as deprecated and will be removed in version 5.0.0 of the library.

  • #2773 7462b9715 Thanks @angrykoala! - The requires argument of the @customResolver directive now accepts a graphql selection set. This means it is now possible to require non-scalar fields such as related types.

  • #2773 7462b9715 Thanks @angrykoala! - @cypher directive now requires the parameter columnName.

    This requires all cypher queries to be made with a valid alias that must be referred in this new parameter.

    For Example:

    @neo4j/graphql@3

    @cypher(statement: "MATCH (i:Item) WHERE i.public=true RETURN i.name")
    

    @neo4j/graphql@4

    @cypher(statement: "MATCH (i:Item) WHERE i.public=true RETURN i.name as result", columnName: "result")
    
  • #2773 7462b9715 Thanks @angrykoala! - neo4jDatabaseInfo has been removed from the context. It is our belief that this has little utility in the library. If you regularly use different drivers connected to different versions of Neo4j and require this feature, please raise an issue: https://github.com/neo4j/graphql/issues/new/choose

  • #2773 7462b9715 Thanks @angrykoala! - The @id directive has had a number of breaking changes.

    The unique argument has been removed. In an effort to simplify directives, @id will now only only be responsible for the autogeneration of UUID values.
    If you would like the property to also be backed by a unique node property constraint, use the @unique directive alongside @id.

    The autogenerate argument has been removed. With this value set to false and the above removal of constraint management, this would make the directive a no-op.

    The global argument has been removed. This quite key feature of specifying the globally unique identifier for Relay was hidden away inside the @id directive. This functionality has been moved into its own directive, @relayId, which is used with no arguments. The use of the @relayId directive also implies that the field will be backed by a unique node property constraint.

    Note, if using the @id and @relayId directive together on the same field, this will be an autogenerated ID compatible with Relay, and be backed by a single unique node property constraint. If you wish to give this constraint a name, use the @unique directive also with the constraintName argument.

  • #2773 7462b9715 Thanks @angrykoala! - Made @relationshipProperties mandatory for relationship property interfaces

  • #2773 7462b9715 Thanks @angrykoala! - config.callbacks has been deprecated and replaced with features.populatedBy.callbacks. See https://neo4j.com/docs/graphql-manual/current/guides/v4-migration/#_callback_renamed_to_populatedby for more information.

  • #2773 7462b9715 Thanks @angrykoala! - Validation of type definitions is now configured using the validate boolean option in the constructor, which defaults to true.

  • #2773 7462b9715 Thanks @angrykoala! - Use driver default access mode "READ" for @cypher directives in the Query type, and "WRITE" in the Mutation type.

  • #2773 7462b9715 Thanks @angrykoala! - Removed @computed directive. Please use @customResolver instead.

  • #2773 7462b9715 Thanks @angrykoala! - Remove all arguments from IExecutableSchemaDefinition apart from typeDefs and resolvers. This is to simplify the API and to remove any unexpected behaviours from arguments which we blindly pass through.

  • #2773 7462b9715 Thanks @angrykoala! - All labels and field names are escaped in the generated Cypher

  • #2773 7462b9715 Thanks @angrykoala! - enableRegex has been removed and replaced with MATCHES filters in the features configuration object. See the migration guide for more information: https://neo4j.com/docs/graphql-manual/current/guides/v4-migration

  • #2773 7462b9715 Thanks @angrykoala! - Relationship type strings are now automatically escaped using backticks. If you were using backticks in the type argument of your @relationship directives, these should now be removed to avoid backticks being added into your relationship type labels.

  • #2773 7462b9715 Thanks @angrykoala! - cypherQueryOptions moved into context-only, as a per-request option.

Minor Changes

  • #2773 7462b9715 Thanks @angrykoala! - The evaluation of authorization rules is now supported when using the Neo4j GraphQL Library as a Federation Subgraph.

Patch Changes

  • #2773 7462b9715 Thanks @angrykoala! - cypherParams in the context now work as expected when using the OGM

  • #2773 7462b9715 Thanks @angrykoala! - cypherParams added to the Neo4jGraphQLContext type, and the fields within it can be referred to directly.

@neo4j/[email protected]

Major Changes

  • #2773 7462b9715 Thanks @angrykoala! - Deprecated @node directive arguments label and additionalLabels have been removed. Please use the labels argument.

Patch Changes

@neo4j/[email protected]

Major Changes

  • #2773 7462b9715 Thanks @angrykoala! - The Neo4j GraphQL Library now only accepts a string, DocumentNode or an array containing these types. A callback function returning these is also accepted. This is a reduction from TypeSource which also included types such as GraphQLSchema and DefinitionNode, which would have resulted in unexpected behaviour if passed in.

  • #2773 7462b9715 Thanks @angrykoala! - Programmatic toggling of debug logging is now done using the debug option of the constructor.

  • #2773 7462b9715 Thanks @angrykoala! - The minimum version of neo4j-driver is now 5.8.0, please upgrade. The boomkark field in the selection set has been marked as deprecated and will be removed in version 5.0.0 of the library.

  • #2773 7462b9715 Thanks @angrykoala! - Remove nodes from the public API of the OGM class.

  • #2773 7462b9715 Thanks @angrykoala! - Validation of type definitions is now configured using the validate boolean option in the constructor, which defaults to true.

  • #2773 7462b9715 Thanks @angrykoala! - Remove all arguments from IExecutableSchemaDefinition apart from typeDefs and resolvers. This is to simplify the API and to remove any unexpected behaviours from arguments which we blindly pass through.

  • #2773 7462b9715 Thanks @angrykoala! - cypherQueryOptions moved into context-only, as a per-request option.

Patch Changes

@neo4j/[email protected]

[email protected]

Patch Changes

@neo4j/[email protected]

Patch Changes

@neo4j-team-graphql
Copy link
Collaborator Author

neo4j-team-graphql commented Sep 1, 2023

Thanks for the Neo4j GraphQL Toolbox updates.

The Neo4j GraphQL Toolbox has now been torn down - reopening this PR will republish it.

@neo4j-team-graphql
Copy link
Collaborator Author

neo4j-team-graphql commented Sep 1, 2023

Performance Report

No Performance Changes

Show Full Table
name dbHits old dbHits time (ms) old time (ms) maxRows
aggregations.TopLevelAggregate 3403 3403 40 62 1134
aggregations.NestedAggregation 16553 16553 95 97 2174
aggregations.AggregationWithWhere 11979 11979 48 62 2174
aggregations.AggregationWhereWithinNestedRelationships 22116987 22116987 3248 3302 2008534
aggregations.AggregationWhereWithinNestedConnections 22116987 22116987 3135 3178 2008534
aggregations.NestedCountFromMovieToActors 9734 9734 42 52 2174
aggregations.NestedCountFromActorsToMovie 9937 9937 55 55 2174
aggregations.DeeplyNestedCount 13070331 13070329 4639 5248 2008534
batch-create.BatchCreate 4200 4200 228 158 600
batch-create.BatchCreateSmall 77 77 76 197 11
connect.createAndConnect 14424 14424 192 275 3003
connections.Connection 14082 14082 120 73 2174
connections.NestedConnection 45472 45472 114 128 4516
connections.ConnectionWithSort 3284 3284 72 101 1040
connections.ConnectionWithSortAndCypher 16325 16325 101 139 2174
create.SimpleMutation 7 7 62 80 1
cypher-directive.TopLevelMutationDirective 1135 1135 30 61 1134
delete.SimpleDelete 19401 19401 230 348 1040
delete.NestedDeleteInUpdate 19198 19198 221 179 1183
2925.SingleRelationshipFilter 6468 6468 118 58 1040
2925.NestedSingleRelationshipFilter 22900 22900 129 157 2174
2925.SingleRelationshipRequiredFilter 5201 5201 51 51 1040
2925.NestedSingleRelationshipRequiredFilter 9361 9361 64 114 1040
query.SimpleQuery 3121 3121 24 32 1040
query.SimpleQueryWithRelationship 16162 16162 47 72 2174
query.QueryWhere 9709 9709 39 51 2166
query.SimpleQueryWithNestedWhere 9887 9887 56 86 2166
query.Nested 10096041 10096041 10436 11678 2008534
query.NestedWithFilter 10074401 10074401 10086 11337 2004000
query.OrFilterOnRelationships 43997 44134 184 256 2151
query.OrFilterOnRelationshipsAndNested 37904 37680 258 396 2151
query.QueryWithNestedIn 13815 13815 61 68 1355
query.NestedConnectionWhere 9834 9834 59 78 2174
query.DeeplyNestedConnectionWhere 9854 9854 83 108 2174
query.DeeplyNestedWithRelationshipFilters 18996 18996 139 208 1552
query.NestedWithRelationshipSingleFilters 3881 3881 187 296 1134
query.Fulltext 80 80 36 38 16
query.FulltextWithNestedQuery 587 587 48 76 84
sorting.SortMultipleTypes 3515 3515 73 118 1040
sorting.SortMultipleTypesWithCypherWithCypher 14472 14472 124 130 2174
sorting.SortOnNestedFields 14082 14082 68 102 2174
sorting.SortDeeplyNestedFields 43198 43198 141 231 4516
sorting.SortWithTopLevelCypher 3396 3396 127 78 1040
unions.SimpleUnionQuery 321 321 89 82 35
unions.SimpleUnionQueryWithMissingFields 293 293 67 92 35
unions.NestedUnion 410637 410637 290 306 33033
unions.NestedUnionWithMissingFields 384611 384611 293 351 33033
update.NestedUpdate 16143 16143 109 127 2002

Old Schema Generation: 45.638s
Schema Generation: 45.432s
Old Subgraph Schema Generation: 55.758s
Subgraph Schema Generation: 57.156s

@neo4j-team-graphql neo4j-team-graphql changed the title changesets for branch dev (beta) changesets for branch dev Sep 1, 2023
@darrellwarde darrellwarde merged commit 2df5663 into dev Sep 1, 2023
84 of 90 checks passed
angrykoala pushed a commit to angrykoala/graphql that referenced this pull request Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Pull requests
Development

Successfully merging this pull request may close these issues.

2 participants