diff --git a/.run/AsciidocReformater.run.xml b/.run/AsciidocReformater.run.xml index 70c82a08..0bb7888c 100644 --- a/.run/AsciidocReformater.run.xml +++ b/.run/AsciidocReformater.run.xml @@ -1,5 +1,5 @@ - + - + \ No newline at end of file diff --git a/.run/JsTemplateDeleter.run.xml b/.run/JsTemplateDeleter.run.xml new file mode 100644 index 00000000..1e89f156 --- /dev/null +++ b/.run/JsTemplateDeleter.run.xml @@ -0,0 +1,11 @@ + + + + \ No newline at end of file diff --git a/.run/JsTestCaseSync.run.xml b/.run/JsTestCaseSync.run.xml index b42b1ff3..d867530b 100644 --- a/.run/JsTestCaseSync.run.xml +++ b/.run/JsTestCaseSync.run.xml @@ -1,5 +1,5 @@ - + - + \ No newline at end of file diff --git a/core/src/main/kotlin/org/atteo/evo/inflector/EnglischInflector.kt b/core/src/main/kotlin/org/atteo/evo/inflector/EnglischInflector.kt index fb528fc6..51f02215 100644 --- a/core/src/main/kotlin/org/atteo/evo/inflector/EnglischInflector.kt +++ b/core/src/main/kotlin/org/atteo/evo/inflector/EnglischInflector.kt @@ -8,6 +8,7 @@ object EnglischInflector : English() { workaround_irregular("person", "people") // TODO workaround_irregular("two", "twos") + workaround_irregular("aircraft", "aircraft") } private fun workaround_irregular(singular: String, plural: String) { diff --git a/core/src/main/kotlin/org/neo4j/graphql/Constants.kt b/core/src/main/kotlin/org/neo4j/graphql/Constants.kt index cad50286..f39ddd3f 100644 --- a/core/src/main/kotlin/org/neo4j/graphql/Constants.kt +++ b/core/src/main/kotlin/org/neo4j/graphql/Constants.kt @@ -25,7 +25,7 @@ object Constants { const val CURSOR_FIELD = "cursor" const val NODE_FIELD = "node" const val RELATIONSHIP_FIELD = "relationship" - const val TYPENAME_IN = "typename_IN" + const val TYPENAME_IN = "typename" const val RESOLVE_TYPE = TYPE_NAME const val RESOLVE_ID = "__id" @@ -60,7 +60,6 @@ object Constants { RelationshipDirective.NAME, ) - const val OPTIONS = "options" const val WHERE = "where" object Types { @@ -71,7 +70,6 @@ object Constants { val Boolean = TypeName("Boolean") val PageInfo = TypeName("PageInfo") - val QueryOptions = TypeName("QueryOptions") val SortDirection = TypeName("SortDirection") val PointDistance = TypeName("PointDistance") val CartesianPointDistance = TypeName("CartesianPointDistance") diff --git a/core/src/main/kotlin/org/neo4j/graphql/QueryContext.kt b/core/src/main/kotlin/org/neo4j/graphql/QueryContext.kt index 3e1caba6..d925465a 100644 --- a/core/src/main/kotlin/org/neo4j/graphql/QueryContext.kt +++ b/core/src/main/kotlin/org/neo4j/graphql/QueryContext.kt @@ -14,21 +14,27 @@ data class QueryContext @JvmOverloads constructor( private var paramKeysPerValues = mutableMapOf>>() fun resolve(string: String): String { - return contextParams?.let { params -> - CONTEXT_VARIABLE_PATTERN.replace(string) { - val path = it.groups[1] ?: it.groups[2] ?: throw IllegalStateException("expected a group") - val parts = path.value.split(".") - var o: Any = params - for (part in parts) { - if (o is Map<*, *>) { - o = o[part] ?: return@replace "" + return CONTEXT_VARIABLE_PATTERN.replace(string) { + val path = it.groups[1] ?: it.groups[2] ?: throw IllegalStateException("expected a group") + val parts = path.value.split(".") + var o: Any? = null + for ((index, part) in parts.withIndex()) { + if (index == 0) { + if (part == "context") { + o = contextParams + continue } else { - TODO("only maps are currently supported") + TODO("query context does not provide a `$part`") } } - return@replace o.toString() + if (o is Map<*, *>) { + o = o[part] ?: return@replace "" + } else { + TODO("only maps are currently supported") + } } - } ?: string + return@replace o.toString() + } } fun getNextVariable(relationField: RelationField) = getNextVariable( @@ -61,6 +67,8 @@ data class QueryContext @JvmOverloads constructor( const val KEY = "Neo4jGraphQLQueryContext" private const val PATH_PATTERN = "([a-zA-Z_][a-zA-Z_0-9]*(?:.[a-zA-Z_][a-zA-Z_0-9]*)*)" + + // matches ${path} or $path private val CONTEXT_VARIABLE_PATTERN = Regex("\\\$(?:\\{$PATH_PATTERN}|$PATH_PATTERN)") } } diff --git a/core/src/main/kotlin/org/neo4j/graphql/domain/Node.kt b/core/src/main/kotlin/org/neo4j/graphql/domain/Node.kt index ed0440e6..500df97a 100644 --- a/core/src/main/kotlin/org/neo4j/graphql/domain/Node.kt +++ b/core/src/main/kotlin/org/neo4j/graphql/domain/Node.kt @@ -37,7 +37,7 @@ class Node( } fun asCypherNode(queryContext: QueryContext?, name: String? = null) = - Cypher.node(mainLabel, additionalLabels(queryContext)).let { + Cypher.node(mapLabelWithContext(mainLabel, queryContext), additionalLabels(queryContext)).let { when { name != null -> it.named(name) else -> it @@ -45,7 +45,7 @@ class Node( } fun asCypherNode(queryContext: QueryContext?, name: SymbolicName) = - Cypher.node(mainLabel, additionalLabels(queryContext)).named(name) + Cypher.node(mapLabelWithContext(mainLabel, queryContext), additionalLabels(queryContext)).named(name) } diff --git a/core/src/main/kotlin/org/neo4j/graphql/domain/NodeFactory.kt b/core/src/main/kotlin/org/neo4j/graphql/domain/NodeFactory.kt index 5288e801..a7e0a1d5 100644 --- a/core/src/main/kotlin/org/neo4j/graphql/domain/NodeFactory.kt +++ b/core/src/main/kotlin/org/neo4j/graphql/domain/NodeFactory.kt @@ -22,7 +22,7 @@ object NodeFactory { val schemeDirectives = typeDefinitionRegistry.schemaExtensionDefinitions?.map { it.directives }?.flatten() ?: emptyList() val annotations = Annotations(schemeDirectives + definition.directives, typeDefinitionRegistry, definition.name) - if (annotations.relationshipProperties != null) { + if (annotations.node == null || annotations.relationshipProperties != null) { return null } val interfaces = definition.implements.mapNotNull { interfaceFactory(it.name()) } diff --git a/core/src/main/kotlin/org/neo4j/graphql/domain/directives/RelationshipDirective.kt b/core/src/main/kotlin/org/neo4j/graphql/domain/directives/RelationshipDirective.kt index a639a281..6ced401b 100644 --- a/core/src/main/kotlin/org/neo4j/graphql/domain/directives/RelationshipDirective.kt +++ b/core/src/main/kotlin/org/neo4j/graphql/domain/directives/RelationshipDirective.kt @@ -26,7 +26,7 @@ class RelationshipDirective private constructor( val queryDirection = directive.readArgument(RelationshipDirective::queryDirection) { RelationField.QueryDirection.valueOf((it as EnumValue).name) } - ?: RelationField.QueryDirection.DEFAULT_DIRECTED + ?: RelationField.QueryDirection.DIRECTED return RelationshipDirective(direction, type, properties, queryDirection) } diff --git a/core/src/main/kotlin/org/neo4j/graphql/domain/fields/PointField.kt b/core/src/main/kotlin/org/neo4j/graphql/domain/fields/PointField.kt index cf2ed16f..3f134e88 100644 --- a/core/src/main/kotlin/org/neo4j/graphql/domain/fields/PointField.kt +++ b/core/src/main/kotlin/org/neo4j/graphql/domain/fields/PointField.kt @@ -31,12 +31,13 @@ class PointField( override val predicateDefinitions: Map = initPredicates() override val whereType get() = when (coordinateType) { - CoordinateType.GEOGRAPHIC -> POINT_INPUT_TYPE.asType() - CoordinateType.CARTESIAN -> CARTESIAN_POINT_INPUT_TYPE.asType() + CoordinateType.GEOGRAPHIC -> TypeName(POINT_INPUT_TYPE) + CoordinateType.CARTESIAN -> TypeName(CARTESIAN_POINT_INPUT_TYPE) } private fun initPredicates(): Map { val result = mutableMapOf() + .add(FieldOperator.IMPLICIT_EQUAL, deprecated = "Please use the explicit _EQ version") .add(FieldOperator.EQUAL) if (isList()) { result.addIncludesResolver(FieldOperator.INCLUDES) @@ -77,7 +78,7 @@ class PointField( val paramPointArray = Cypher.listWith(p).`in`(parameter).returning(Cypher.point(p)) op.conditionCreator(property, paramPointArray) }, - type = whereType.NonNull.List + type = whereType.makeRequired(type.isRequired()).List ) } @@ -88,7 +89,7 @@ class PointField( val paramPoint = Cypher.point(parameter) op.conditionCreator(property, paramPoint) }, - type = whereType.inner() + type = whereType ) } diff --git a/core/src/main/kotlin/org/neo4j/graphql/domain/fields/RelationField.kt b/core/src/main/kotlin/org/neo4j/graphql/domain/fields/RelationField.kt index f8c276b2..19cf030a 100644 --- a/core/src/main/kotlin/org/neo4j/graphql/domain/fields/RelationField.kt +++ b/core/src/main/kotlin/org/neo4j/graphql/domain/fields/RelationField.kt @@ -41,39 +41,22 @@ class RelationField( } enum class QueryDirection { - DEFAULT_DIRECTED, - DEFAULT_UNDIRECTED, - DIRECTED_ONLY, - UNDIRECTED_ONLY, + DIRECTED, + UNDIRECTED, } fun createQueryDslRelation( start: Node, end: Node, - directed: Boolean?, ): Relationship { - val useDirected = when (queryDirection) { - QueryDirection.DEFAULT_DIRECTED -> directed ?: true - QueryDirection.DEFAULT_UNDIRECTED -> directed ?: false - QueryDirection.DIRECTED_ONLY -> { - check(directed == null || directed == true, { "Invalid direction in 'DIRECTED_ONLY' relationship" }) - true + return when (queryDirection) { + QueryDirection.DIRECTED -> when (direction) { + Direction.IN -> end.relationshipTo(start, relationType) + Direction.OUT -> start.relationshipTo(end, relationType) } - QueryDirection.UNDIRECTED_ONLY -> { - check(directed == null || directed == false, { "Invalid direction in 'UNDIRECTED_ONLY' relationship" }) - false - } - } - if (useDirected) { - return createDslRelation(start, end) + QueryDirection.UNDIRECTED -> start.relationshipBetween(end, relationType) } - return start.relationshipBetween(end, relationType) } - fun createDslRelation(start: Node, end: Node, name: String? = null): Relationship = when (direction) { - Direction.IN -> end.relationshipTo(start, relationType) - Direction.OUT -> start.relationshipTo(end, relationType) - }.let { if (name != null) it.named(name) else it } - } diff --git a/core/src/main/kotlin/org/neo4j/graphql/domain/fields/ScalarField.kt b/core/src/main/kotlin/org/neo4j/graphql/domain/fields/ScalarField.kt index 16dbc972..30894a9b 100644 --- a/core/src/main/kotlin/org/neo4j/graphql/domain/fields/ScalarField.kt +++ b/core/src/main/kotlin/org/neo4j/graphql/domain/fields/ScalarField.kt @@ -37,6 +37,7 @@ abstract class ScalarField( } val result = mutableMapOf() + .add(FieldOperator.IMPLICIT_EQUAL, resolver, deprecated = "Please use the explicit _EQ version") .add(FieldOperator.EQUAL, resolver) if (fieldType == Constants.BOOLEAN) { return result diff --git a/core/src/main/kotlin/org/neo4j/graphql/domain/naming/ImplementingTypeNames.kt b/core/src/main/kotlin/org/neo4j/graphql/domain/naming/ImplementingTypeNames.kt index 6f42c94e..2482a737 100644 --- a/core/src/main/kotlin/org/neo4j/graphql/domain/naming/ImplementingTypeNames.kt +++ b/core/src/main/kotlin/org/neo4j/graphql/domain/naming/ImplementingTypeNames.kt @@ -8,7 +8,6 @@ sealed class ImplementingTypeNames( ) : EntityNames(name, annotations) { val connectOrCreateWhereInputTypeName get() = "${name}ConnectOrCreateWhere" - val optionsInputTypeName get() = "${name}Options" val sortInputTypeName get() = "${name}Sort" override val rootTypeFieldNames get() = ImplementingTypeRootTypeFieldNames() val rootTypeSelection get() = ImplementingTypeRootTypeSelection() diff --git a/core/src/main/kotlin/org/neo4j/graphql/domain/predicates/FieldOperator.kt b/core/src/main/kotlin/org/neo4j/graphql/domain/predicates/FieldOperator.kt index d5877dbc..7d6ad3f3 100644 --- a/core/src/main/kotlin/org/neo4j/graphql/domain/predicates/FieldOperator.kt +++ b/core/src/main/kotlin/org/neo4j/graphql/domain/predicates/FieldOperator.kt @@ -9,7 +9,11 @@ enum class FieldOperator( val conditionCreator: (Expression, Expression) -> Condition, val conditionEvaluator: (Any?, Any?) -> Boolean, ) { - EQUAL("", + IMPLICIT_EQUAL("", + { lhs, rhs -> if (rhs == Cypher.literalNull()) lhs.isNull else lhs.eq(rhs) }, + { lhs, rhs -> lhs == rhs } + ), + EQUAL("EQ", { lhs, rhs -> if (rhs == Cypher.literalNull()) lhs.isNull else lhs.eq(rhs) }, { lhs, rhs -> lhs == rhs } ), diff --git a/core/src/main/kotlin/org/neo4j/graphql/domain/predicates/RelationOperator.kt b/core/src/main/kotlin/org/neo4j/graphql/domain/predicates/RelationOperator.kt index 9700ec21..64ef7259 100644 --- a/core/src/main/kotlin/org/neo4j/graphql/domain/predicates/RelationOperator.kt +++ b/core/src/main/kotlin/org/neo4j/graphql/domain/predicates/RelationOperator.kt @@ -14,7 +14,6 @@ enum class RelationOperator( NONE("NONE", list = true, wrapInNotIfNeeded = { it.not() }), SINGLE("SINGLE", list = true), SOME("SOME", list = true), - NOT_EQUAL("NOT", list = false, wrapInNotIfNeeded = { it.not() }), EQUAL(null, list = false); fun createRelationCondition( diff --git a/core/src/main/kotlin/org/neo4j/graphql/handler/BaseDataFetcher.kt b/core/src/main/kotlin/org/neo4j/graphql/handler/BaseDataFetcher.kt index e4518710..070fe42a 100644 --- a/core/src/main/kotlin/org/neo4j/graphql/handler/BaseDataFetcher.kt +++ b/core/src/main/kotlin/org/neo4j/graphql/handler/BaseDataFetcher.kt @@ -39,6 +39,12 @@ internal abstract class BaseDataFetcher(protected val schemaConfig: SchemaConfig } val result = neo4jAdapter.executeQuery(query, params) + return mapResult(env, result) + } + + protected abstract fun generateCypher(env: DataFetchingEnvironment): Statement + + protected open fun mapResult(env: DataFetchingEnvironment, result: List>): Any { return if (env.fieldDefinition.type?.isList() == true) { result.map { it[RESULT_VARIABLE] } } else { @@ -47,8 +53,6 @@ internal abstract class BaseDataFetcher(protected val schemaConfig: SchemaConfig } } - protected abstract fun generateCypher(env: DataFetchingEnvironment): Statement - companion object { const val RESULT_VARIABLE = "this" } diff --git a/core/src/main/kotlin/org/neo4j/graphql/handler/ConnectionResolver.kt b/core/src/main/kotlin/org/neo4j/graphql/handler/ConnectionResolver.kt index 503c9316..688ad359 100644 --- a/core/src/main/kotlin/org/neo4j/graphql/handler/ConnectionResolver.kt +++ b/core/src/main/kotlin/org/neo4j/graphql/handler/ConnectionResolver.kt @@ -18,6 +18,7 @@ import org.neo4j.graphql.schema.model.inputs.options.SortInput import org.neo4j.graphql.schema.model.outputs.root_connection.RootNodeConnectionSelection import org.neo4j.graphql.translate.ProjectionTranslator import org.neo4j.graphql.translate.TopLevelMatchTranslator +import org.neo4j.graphql.utils.PagingUtils import org.neo4j.graphql.utils.ResolveTree /** @@ -75,7 +76,7 @@ internal class ConnectionResolver private constructor( SortInput.Companion.Augmentation .generateSortIT(implementingType, ctx) - ?.let { args += inputValue(Constants.SORT, it.List) } + ?.let { args += inputValue(Constants.SORT, it.NonNull.List) } args += inputValue(Constants.FIRST, Constants.Types.Int) args += inputValue(Constants.AFTER, Constants.Types.String) @@ -119,10 +120,6 @@ internal class ConnectionResolver private constructor( val alias = queryContext.getNextVariable(edgesSelection.aliasOrName) - - edgeSelection?.forEachField(Constants.CURSOR_FIELD) { - TODO() - } val subQueriesBeforeSort = mutableListOf() val subQueriesAfterSort = mutableListOf() @@ -187,4 +184,34 @@ internal class ConnectionResolver private constructor( .returning(Cypher.mapOf(*topProjection.toTypedArray()).`as`(RESULT_VARIABLE)) .build() } + + override fun mapResult(env: DataFetchingEnvironment, result: List>): Any { + val data = result.map { it[RESULT_VARIABLE] }.firstOrNull() ?: return emptyMap() + + val resolveTree = ResolveTree.resolve(env) + + val mutableData = (data as? Map<*, *>)?.toMutableMap() ?: return data + + val connectionSelection = resolveTree.fieldsByTypeName[implementingType.namings.rootTypeSelection.connection] + connectionSelection?.forEachField(Constants.EDGES_FIELD) { edgesSelection -> + val edgeSelection = edgesSelection.fieldsByTypeName[implementingType.namings.rootTypeSelection.edge] + + mutableData[edgesSelection.aliasOrName] = mutableData[edgesSelection.aliasOrName]?.let { + if (it !is List<*>) { + return@forEachField + } + val input = InputArguments(implementingType, resolveTree.args) + val sliceStart = (input.options.offset ?: -1) + 1 + + it.mapIndexed{ index, edge -> + val mutableEdge = (edge as? Map<*, *>)?.toMutableMap() ?: return@mapIndexed edge + edgeSelection?.forEachField(Constants.CURSOR_FIELD) { + mutableEdge[it.aliasOrName] = PagingUtils.createCursor(sliceStart + index) + } + mutableEdge + } + } + } + return mutableData + } } diff --git a/core/src/main/kotlin/org/neo4j/graphql/handler/ReadResolver.kt b/core/src/main/kotlin/org/neo4j/graphql/handler/ReadResolver.kt index cb582e9a..0cf497f4 100644 --- a/core/src/main/kotlin/org/neo4j/graphql/handler/ReadResolver.kt +++ b/core/src/main/kotlin/org/neo4j/graphql/handler/ReadResolver.kt @@ -14,6 +14,7 @@ import org.neo4j.graphql.schema.ArgumentsAugmentation import org.neo4j.graphql.schema.AugmentationContext import org.neo4j.graphql.schema.AugmentationHandler import org.neo4j.graphql.schema.model.inputs.Dict +import org.neo4j.graphql.schema.model.inputs.PerNodeInput import org.neo4j.graphql.schema.model.inputs.WhereInput import org.neo4j.graphql.schema.model.inputs.options.OptionsInput import org.neo4j.graphql.schema.model.outputs.NodeSelection @@ -21,6 +22,7 @@ import org.neo4j.graphql.translate.ProjectionTranslator import org.neo4j.graphql.translate.TopLevelMatchTranslator import org.neo4j.graphql.translate.projection.createUnionQueries import org.neo4j.graphql.utils.ResolveTree +import org.neo4j.graphql.utils.filterOnlyRequestedNodes /** * This class handles all the logic related to the querying of nodes. @@ -58,7 +60,7 @@ internal class ReadResolver internal constructor( val where = args.nestedDict(Constants.WHERE) ?.let { WhereInput.create(entity, it) } - val options = OptionsInput.create(entity as? ImplementingType, args.nestedDict(Constants.OPTIONS)) + val options = OptionsInput.create(entity as? ImplementingType, args) class Augmentation(val entity: Entity, val ctx: AugmentationContext) : ArgumentsAugmentation { override fun augmentArguments(args: MutableList) { @@ -66,9 +68,8 @@ internal class ReadResolver internal constructor( WhereInput.Augmentation.generateWhereIT(entity, ctx) ?.let { args += inputValue(Constants.WHERE, it.asType()) } - OptionsInput.Augmentation - .generateOptionsIT(entity, ctx) - .let { args += inputValue(Constants.OPTIONS, it.asType()) } + args += OptionsInput.Augmentation + .generateOptionsArguments(entity, ctx) } } } @@ -130,7 +131,7 @@ internal class ReadResolver internal constructor( val input = InputArguments(entity, resolveTree.args) val unionQueries = createUnionQueries( - nodes, + if (input.where is PerNodeInput<*>) filterOnlyRequestedNodes(nodes, input.where) else nodes, resolveTree, Cypher.name(RESULT_VARIABLE), queryContext, diff --git a/core/src/main/kotlin/org/neo4j/graphql/schema/model/inputs/field_arguments/ConnectionFieldInputArgs.kt b/core/src/main/kotlin/org/neo4j/graphql/schema/model/inputs/field_arguments/ConnectionFieldInputArgs.kt index 20977643..639ee870 100644 --- a/core/src/main/kotlin/org/neo4j/graphql/schema/model/inputs/field_arguments/ConnectionFieldInputArgs.kt +++ b/core/src/main/kotlin/org/neo4j/graphql/schema/model/inputs/field_arguments/ConnectionFieldInputArgs.kt @@ -26,8 +26,6 @@ class ConnectionFieldInputArgs(field: ConnectionField, data: Dict) { sortFactory = { ConnectionSort(field, it) } ) - val directed = data.nestedObject(Constants.DIRECTED) as? Boolean - object Augmentation : AugmentationBase { fun getFieldArguments(field: ConnectionField, ctx: AugmentationContext): List { @@ -40,8 +38,6 @@ class ConnectionFieldInputArgs(field: ConnectionField, data: Dict) { args += inputValue(Constants.FIRST, Constants.Types.Int) args += inputValue(Constants.AFTER, Constants.Types.String) - RelationFieldInputArgs.Augmentation.directedArgument(field.relationshipField)?.let { args += it } - ConnectionSort.Augmentation .generateConnectionSortIT(field, ctx) ?.let { args += inputValue(Constants.SORT, it.NonNull.List) } diff --git a/core/src/main/kotlin/org/neo4j/graphql/schema/model/inputs/field_arguments/RelationFieldInputArgs.kt b/core/src/main/kotlin/org/neo4j/graphql/schema/model/inputs/field_arguments/RelationFieldInputArgs.kt index 2583d86d..001ffce2 100644 --- a/core/src/main/kotlin/org/neo4j/graphql/schema/model/inputs/field_arguments/RelationFieldInputArgs.kt +++ b/core/src/main/kotlin/org/neo4j/graphql/schema/model/inputs/field_arguments/RelationFieldInputArgs.kt @@ -1,6 +1,5 @@ package org.neo4j.graphql.schema.model.inputs.field_arguments -import graphql.language.BooleanValue import graphql.language.InputValueDefinition import org.neo4j.graphql.Constants import org.neo4j.graphql.asType @@ -17,10 +16,8 @@ class RelationFieldInputArgs(field: RelationField, data: Dict) { val where = data.nestedDict(Constants.WHERE) ?.let { WhereInput.create(field, it) } - val directed = data.nestedObject(Constants.DIRECTED) as? Boolean - val options = OptionsInput - .create(field.implementingType, data.nestedDict(Constants.OPTIONS)) + .create(field.implementingType, data) .merge(field.node) @@ -33,24 +30,9 @@ class RelationFieldInputArgs(field: RelationField, data: Dict) { .generateWhereOfFieldIT(field, ctx) ?.let { args += inputValue(Constants.WHERE, it.asType()) } - val optionType = (field).extractOnTarget( - onImplementingType = { OptionsInput.Augmentation.generateOptionsIT(it, ctx).asType() }, - onUnion = { Constants.Types.QueryOptions }, - ) - args += inputValue(Constants.OPTIONS, optionType) - - directedArgument(field)?.let { args += it } + args += OptionsInput.Augmentation.generateOptionsArguments(field.target, ctx) return args } - - fun directedArgument(relationshipField: RelationBaseField): InputValueDefinition? = - when ((relationshipField as? RelationField)?.queryDirection) { - RelationField.QueryDirection.DEFAULT_DIRECTED -> true - RelationField.QueryDirection.DEFAULT_UNDIRECTED -> false - else -> null - }?.let { defaultVal -> - inputValue(Constants.DIRECTED, Constants.Types.Boolean) { defaultValue(BooleanValue(defaultVal)) } - } } } diff --git a/core/src/main/kotlin/org/neo4j/graphql/schema/model/inputs/options/OptionsInput.kt b/core/src/main/kotlin/org/neo4j/graphql/schema/model/inputs/options/OptionsInput.kt index 89df2e96..9d81ad94 100644 --- a/core/src/main/kotlin/org/neo4j/graphql/schema/model/inputs/options/OptionsInput.kt +++ b/core/src/main/kotlin/org/neo4j/graphql/schema/model/inputs/options/OptionsInput.kt @@ -1,15 +1,18 @@ package org.neo4j.graphql.schema.model.inputs.options -import org.neo4j.graphql.* +import graphql.language.InputValueDefinition +import org.neo4j.graphql.Constants +import org.neo4j.graphql.List +import org.neo4j.graphql.asRequiredType import org.neo4j.graphql.domain.Entity import org.neo4j.graphql.domain.FieldContainer import org.neo4j.graphql.domain.ImplementingType -import org.neo4j.graphql.domain.Node import org.neo4j.graphql.domain.directives.ImplementingTypeAnnotations import org.neo4j.graphql.domain.directives.LimitDirective import org.neo4j.graphql.schema.AugmentationBase import org.neo4j.graphql.schema.AugmentationContext import org.neo4j.graphql.schema.model.inputs.Dict +import org.neo4j.graphql.toDict import org.neo4j.graphql.utils.PagingUtils data class OptionsInput( @@ -70,6 +73,7 @@ data class OptionsInput( Constants.AFTER -> (map.nestedObject(offsetName) as? String) ?.let { PagingUtils.getOffsetFromCursor(it) } ?.let { it + 1 } + else -> map.nestedObject(offsetName) as? Int }, if (sortFactory == null) emptyList() else map.nestedDictList(sortName).map { sortFactory(it) } @@ -78,26 +82,27 @@ data class OptionsInput( object Augmentation : AugmentationBase { - fun generateOptionsIT(implementingType: ImplementingType, ctx: AugmentationContext) = - ctx.getOrCreateInputObjectType(implementingType.namings.optionsInputTypeName) { fields, _ -> - fields += inputValue(Constants.LIMIT, Constants.Types.Int) - fields += inputValue(Constants.OFFSET, Constants.Types.Int) + fun generateOptionsArguments( + entity: Entity, + ctx: AugmentationContext + ): List { + val arguments = mutableListOf() + + arguments += inputValue(Constants.LIMIT, Constants.Types.Int) + arguments += inputValue(Constants.OFFSET, Constants.Types.Int) + + if (entity is ImplementingType) { SortInput.Companion.Augmentation - .generateSortIT(implementingType, ctx) + .generateSortIT(entity, ctx) ?.let { - fields += inputValue( - Constants.SORT, - // TODO make all required, this is only for api alignment - it.asType(required = implementingType is Node).List - ) { - description("Specify one or more ${implementingType.name}Sort objects to sort ${implementingType.pascalCasePlural} by. The sorts will be applied in the order in which they are arranged in the array.".asDescription()) + arguments += inputValue(Constants.SORT, it.asRequiredType().List) { + // TODO add in typescript + // description("Specify one or more ${entity.name}Sort objects to sort ${entity.pascalCasePlural} by. The sorts will be applied in the order in which they are arranged in the array.".asDescription()) } } - } ?: throw IllegalStateException("at least the paging fields should be present") + } + return arguments + } - fun generateOptionsIT(entity: Entity, ctx: AugmentationContext): String = entity.extractOnTarget( - { generateOptionsIT(it, ctx) }, - { Constants.Types.QueryOptions.name } - ) } } diff --git a/core/src/main/kotlin/org/neo4j/graphql/translate/ProjectionTranslator.kt b/core/src/main/kotlin/org/neo4j/graphql/translate/ProjectionTranslator.kt index 9a0da4fd..304ab057 100644 --- a/core/src/main/kotlin/org/neo4j/graphql/translate/ProjectionTranslator.kt +++ b/core/src/main/kotlin/org/neo4j/graphql/translate/ProjectionTranslator.kt @@ -17,6 +17,7 @@ import org.neo4j.graphql.translate.projection.projectScalarField import org.neo4j.graphql.translate.where.createWhere import org.neo4j.graphql.utils.ResolveTree import org.neo4j.graphql.utils.SelectionOfType +import org.neo4j.graphql.utils.filterOnlyRequestedNodes class ProjectionTranslator { @@ -85,15 +86,14 @@ class ProjectionTranslator { var referenceNodes = requireNotNull(nodeField.union).nodes.values if (unionWhere != null) { - referenceNodes = - referenceNodes.filter { !unionWhere.getDataForNode(it)?.predicates.isNullOrEmpty() } + referenceNodes = filterOnlyRequestedNodes(referenceNodes, unionWhere) } val aliasVar = queryContext.getNextVariable(alias) val unionSubQueries = referenceNodes.map { refNode -> val endNode = refNode.asCypherNode(queryContext, queryContext.getNextVariable(refNode)) val nodeResult = endNode.requiredSymbolicName - val rel = nodeField.createQueryDslRelation(varName, endNode, arguments.directed) + val rel = nodeField.createQueryDslRelation(varName, endNode) .named(queryContext.getNextVariable(nodeField)) val whereInput = arguments.where as WhereInput.UnionWhereInput? @@ -148,7 +148,7 @@ class ProjectionTranslator { val endNode = referenceNode!!.asCypherNode(queryContext, queryContext.getNextVariable(referenceNode)) - val rel = nodeField.createQueryDslRelation(varName, endNode, arguments.directed) + val rel = nodeField.createQueryDslRelation(varName, endNode) .named(queryContext.getNextVariable(nodeField)) //TODO harmonize with union? diff --git a/core/src/main/kotlin/org/neo4j/graphql/translate/connection_clause/CreateConnectionClause.kt b/core/src/main/kotlin/org/neo4j/graphql/translate/connection_clause/CreateConnectionClause.kt index a3143241..75704e2a 100644 --- a/core/src/main/kotlin/org/neo4j/graphql/translate/connection_clause/CreateConnectionClause.kt +++ b/core/src/main/kotlin/org/neo4j/graphql/translate/connection_clause/CreateConnectionClause.kt @@ -12,6 +12,7 @@ import org.neo4j.graphql.translate.ProjectionTranslator import org.neo4j.graphql.translate.projection.projectScalarField import org.neo4j.graphql.translate.where.createConnectionWhere import org.neo4j.graphql.utils.ResolveTree +import org.neo4j.graphql.utils.filterOnlyRequestedNodes fun createConnectionClause( resolveTree: ResolveTree, @@ -53,7 +54,7 @@ fun createConnectionClause( val unionConnectionWhere = arguments.where as? ConnectionWhere.UnionConnectionWhere var nodes = union.nodes.values if (unionConnectionWhere != null) { - nodes = nodes.filter { !unionConnectionWhere.getDataForNode(it)?.predicates.isNullOrEmpty() } + nodes = filterOnlyRequestedNodes(nodes, unionConnectionWhere) } createConnectionClauseForMultipleNodes( nodes, @@ -158,7 +159,7 @@ private fun createConnectionClauseForSingleNode( val endNode = relatedNode.asCypherNode(queryContext, queryContext.getNextVariable(relatedNode)) - val rel = relField.createQueryDslRelation(startNode, endNode, args.directed) + val rel = relField.createQueryDslRelation(startNode, endNode) .named(queryContext.getNextVariable(relField)) val whereInput = when (args.where) { is ConnectionWhere.ImplementingTypeConnectionWhere<*> -> args.where @@ -265,7 +266,7 @@ private fun createEdgeSubquery( val endNode = relatedNode.asCypherNode(queryContext, queryContext.getNextVariable(relatedNode)) - val rel = relField.createQueryDslRelation(startNode, endNode, args.directed) + val rel = relField.createQueryDslRelation(startNode, endNode) .named(queryContext.getNextVariable(relField)) val whereInput = when (args.where) { diff --git a/core/src/main/kotlin/org/neo4j/graphql/translate/projection/CreateInterfaceProjection.kt b/core/src/main/kotlin/org/neo4j/graphql/translate/projection/CreateInterfaceProjection.kt index a9f15ad5..177511b0 100644 --- a/core/src/main/kotlin/org/neo4j/graphql/translate/projection/CreateInterfaceProjection.kt +++ b/core/src/main/kotlin/org/neo4j/graphql/translate/projection/CreateInterfaceProjection.kt @@ -35,7 +35,7 @@ fun createInterfaceProjectionAndParams( whereInput ) { relatedNode -> - val pattern = field.createQueryDslRelation(nodeVariable, relatedNode, arguments.directed) + val pattern = field.createQueryDslRelation(nodeVariable, relatedNode) .named(queryContext.getNextVariable(field)) Cypher diff --git a/core/src/main/kotlin/org/neo4j/graphql/translate/where/CreateWhere.kt b/core/src/main/kotlin/org/neo4j/graphql/translate/where/CreateWhere.kt index 7069cbec..17f61719 100644 --- a/core/src/main/kotlin/org/neo4j/graphql/translate/where/CreateWhere.kt +++ b/core/src/main/kotlin/org/neo4j/graphql/translate/where/CreateWhere.kt @@ -70,7 +70,7 @@ fun createWhere( } if (field is RelationField) { - val relation = field.createDslRelation(propertyContainer, endNode) + val relation = field.createQueryDslRelation(propertyContainer, endNode) val cond = op.createRelationCondition(relation, nestedCondition) val condition = cond.let { @@ -79,7 +79,13 @@ fun createWhere( allConditions = when (op) { RelationOperator.SOME -> allConditions or condition RelationOperator.SINGLE -> allConditions xor condition - else -> allConditions and condition + RelationOperator.ALL -> allConditions and condition + RelationOperator.NONE -> allConditions and condition + RelationOperator.EQUAL -> if (where is WhereInput.InterfaceWhereInput) + // relation matches if any of the interfaces' implementations match + allConditions or condition + else + allConditions and condition } } else { TODO() @@ -100,32 +106,33 @@ fun createWhere( val relationField = field.relationshipField val nodeEntries = when (where) { - is ConnectionWhere.UnionConnectionWhere -> where.dataPerNode.mapKeys { propertyContainer.name() } - is ConnectionWhere.ImplementingTypeConnectionWhere<*> -> - // TODO can we use the name somehow else - mapOf(relationField.type.name() to where) - + is ConnectionWhere.UnionConnectionWhere -> where.dataPerNode.values + is ConnectionWhere.ImplementingTypeConnectionWhere<*> -> where.wrapList() else -> throw IllegalStateException("Unsupported where type") } var result: Condition? = null val subQueries = mutableListOf() - nodeEntries.forEach { (nodeName, whereInput) -> + nodeEntries.forEach { whereInput -> val implementingType: ImplementingType val endNode: Node - if (whereInput is ConnectionWhere.InterfaceConnectionWhere) { - implementingType = whereInput.interfaze - endNode = Cypher.anyNode(queryContext.getNextVariable(propertyContainer.name())) - } else { - implementingType = relationField.getNode(nodeName) - ?: throw IllegalArgumentException("Cannot find referenced node $nodeName") - endNode = - implementingType.asCypherNode(queryContext) - .named(queryContext.getNextVariable(propertyContainer.name())) + when (whereInput) { + is ConnectionWhere.InterfaceConnectionWhere -> { + implementingType = whereInput.interfaze + endNode = Cypher.anyNode(queryContext.getNextVariable(propertyContainer.name())) + } + + is ConnectionWhere.NodeConnectionWhere -> { + implementingType = whereInput.node + endNode = + implementingType.asCypherNode(queryContext) + .named(queryContext.getNextVariable(propertyContainer.name())) + } } - val relation = relationField.createDslRelation(propertyContainer, endNode).named("edge") + val relation = relationField.createQueryDslRelation(propertyContainer, endNode) + .named(queryContext.getNextVariable("edge")) var (nestedCondition, preComputedSubQueries) = createConnectionWhere( whereInput, diff --git a/core/src/main/kotlin/org/neo4j/graphql/utils/filterOnlyRequestedNodes.kt b/core/src/main/kotlin/org/neo4j/graphql/utils/filterOnlyRequestedNodes.kt new file mode 100644 index 00000000..8993116e --- /dev/null +++ b/core/src/main/kotlin/org/neo4j/graphql/utils/filterOnlyRequestedNodes.kt @@ -0,0 +1,23 @@ +package org.neo4j.graphql.utils + +import org.neo4j.graphql.domain.Node +import org.neo4j.graphql.schema.model.inputs.PerNodeInput +import org.neo4j.graphql.schema.model.inputs.WhereInput +import org.neo4j.graphql.schema.model.inputs.connection.ConnectionWhere + +fun filterOnlyRequestedNodes( + nodes: Collection, + perNodeWhere: PerNodeInput<*>?, +): Collection { + if (perNodeWhere == null) { + return nodes + } + return nodes.filter { + when (val nodeWhere = perNodeWhere.getDataForNode(it)) { + is WhereInput.NodeWhereInput -> true + is ConnectionWhere.NodeConnectionWhere -> !nodeWhere.predicates.isNullOrEmpty() + null -> false + else -> TODO() + } + } +} diff --git a/core/src/main/resources/lib_directives.graphql b/core/src/main/resources/lib_directives.graphql index 49ba139e..9bf9b50b 100644 --- a/core/src/main/resources/lib_directives.graphql +++ b/core/src/main/resources/lib_directives.graphql @@ -65,7 +65,7 @@ directive @query( directive @relationship( type:String!, "Valid and default directions for this relationship." - queryDirection: RelationshipQueryDirection! = DEFAULT_DIRECTED, + queryDirection: RelationshipQueryDirection! = DIRECTED, direction: RelationshipDirection!, "The name of the interface containing the properties for this relationship." properties: String @@ -93,14 +93,8 @@ enum RelationshipDirection { } enum RelationshipQueryDirection { - "All queries will be **directed** by default, but users may perform undirected queries." - DEFAULT_DIRECTED - "All queries will be **undirected** by default, but users may perform directed queries." - DEFAULT_UNDIRECTED - "Only directed queries can be perform on this relationship." - DIRECTED_ONLY - "Only undirected queries can be perform on this relationship." - UNDIRECTED_ONLY + DIRECTED + UNDIRECTED } "Limit options." diff --git a/core/src/main/resources/neo4j_types.graphql b/core/src/main/resources/neo4j_types.graphql index 7662fc42..41bfed97 100644 --- a/core/src/main/resources/neo4j_types.graphql +++ b/core/src/main/resources/neo4j_types.graphql @@ -103,12 +103,6 @@ input CartesianPointDistance { distance: Float! } -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - "A date, represented as a 'yyyy-mm-dd' string" scalar Date diff --git a/core/src/test/kotlin/org/neo4j/graphql/factories/CypherTestFactory.kt b/core/src/test/kotlin/org/neo4j/graphql/factories/CypherTestFactory.kt index 1ca023e1..768d9e44 100644 --- a/core/src/test/kotlin/org/neo4j/graphql/factories/CypherTestFactory.kt +++ b/core/src/test/kotlin/org/neo4j/graphql/factories/CypherTestFactory.kt @@ -65,12 +65,12 @@ class CypherTestFactory(file: Path, private val driver: Driver? = null, createMi val testData = testCase.setup.testData.firstOrNull() val responseAssertions = testCase.graphqlResponseAssertions var response = testCase.graphqlResponse - if (responseAssertions == null && response == null) { - response = - createCodeBlock(testCase.graphqlRequest!!, "json", "GraphQL-Response", mapOf("response" to "true")) - testCase.graphqlResponse = response - } - if (testData != null && response != null || responseAssertions != null) { + if (testData != null && (response != null || GENERATE_TEST_FILE_DIFF) || responseAssertions != null) { + if (responseAssertions == null && response == null) { + response = + createCodeBlock(testCase.graphqlRequest!!, "json", "GraphQL-Response", mapOf("response" to "true")) + testCase.graphqlResponse = response + } tests.add(integrationTest(section.title, testCase)) } } @@ -354,7 +354,10 @@ class CypherTestFactory(file: Path, private val driver: Driver? = null, createMi } class InvalidQueryException(@Suppress("MemberVisibilityCanBePrivate") val error: GraphQLError) : - RuntimeException(error.message) + RuntimeException(error.message, when (error) { + is ExceptionWhileDataFetching -> error.exception + else -> null + }) companion object { private val DEBUG = System.getProperty("neo4j-graphql-java.debug", "false") == "true" diff --git a/core/src/test/kotlin/org/neo4j/graphql/tools/AsciidocReformater.kt b/core/src/test/kotlin/org/neo4j/graphql/tools/AsciidocReformater.kt index b5053b5e..10f49279 100644 --- a/core/src/test/kotlin/org/neo4j/graphql/tools/AsciidocReformater.kt +++ b/core/src/test/kotlin/org/neo4j/graphql/tools/AsciidocReformater.kt @@ -15,6 +15,9 @@ import org.neo4j.graphql.utils.TestUtils.TEST_RESOURCES import java.nio.file.* import java.nio.file.attribute.BasicFileAttributes +/** + * This class reformats the content of the test files. + */ open class AsciidocReformater { fun run() { diff --git a/core/src/test/kotlin/org/neo4j/graphql/tools/JsTemplateDeleter.kt b/core/src/test/kotlin/org/neo4j/graphql/tools/JsTemplateDeleter.kt new file mode 100644 index 00000000..c28ee1d9 --- /dev/null +++ b/core/src/test/kotlin/org/neo4j/graphql/tools/JsTemplateDeleter.kt @@ -0,0 +1,33 @@ +package org.neo4j.graphql.tools + +import org.neo4j.graphql.utils.TestUtils.IS_TEMPLATE +import org.neo4j.graphql.utils.TestUtils.TEST_RESOURCES +import java.nio.file.* +import java.nio.file.attribute.BasicFileAttributes + +/** + * Deletes all template files. Use this before syncing the tests from the JS project to ensure all deleted tests from + * the JS project are removed. + */ +object JsTemplateDeleter { + + @JvmStatic + fun main(args: Array) { + listOf( + "tck-test-files/schema/v2", + "tck-test-files/cypher/v2", + "integration-test-files" + ) + .forEach { + val root = Paths.get("$TEST_RESOURCES$it") + Files.walkFileTree(root, object : SimpleFileVisitor() { + override fun visitFile(path: Path, attrs: BasicFileAttributes): FileVisitResult { + if (IS_TEMPLATE.test(path)) { + Files.delete(path) + } + return FileVisitResult.CONTINUE + } + }) + } + } +} diff --git a/core/src/test/kotlin/org/neo4j/graphql/tools/JsTestCaseSync.kt b/core/src/test/kotlin/org/neo4j/graphql/tools/JsTestCaseSync.kt index ff6c52f1..7452f916 100644 --- a/core/src/test/kotlin/org/neo4j/graphql/tools/JsTestCaseSync.kt +++ b/core/src/test/kotlin/org/neo4j/graphql/tools/JsTestCaseSync.kt @@ -12,13 +12,15 @@ import org.neo4j.graphql.utils.JsonUtils.parseJson import org.neo4j.graphql.utils.SchemaUtils import org.neo4j.graphql.utils.TestUtils.IS_TEMPLATE import org.neo4j.graphql.utils.TestUtils.IS_TEST_FILE -import org.neo4j.graphql.utils.TestUtils.TEST_RESOURCES import java.io.BufferedReader import java.io.InputStreamReader import java.nio.file.Files import java.nio.file.Path import kotlin.reflect.KProperty1 +/** + * Synchronizes code blocks from the template file to the test file. + */ object JsTestCaseSync : AsciidocReformater() { @@ -71,7 +73,7 @@ object JsTestCaseSync : AsciidocReformater() { // else compare the content of the test file with the template diff // execute `git show HEAD:file` to get the content of the file in the HEAD commit - val previousSourceContent = runGitCommand("git show HEAD:core/$TEST_RESOURCES$file") + val previousSourceContent = runGitCommand("git show HEAD:core/$file") if (previousSourceContent.isEmpty()) { println("File not found in HEAD: $file") return @@ -429,7 +431,7 @@ object JsTestCaseSync : AsciidocReformater() { return } - TODO("target file does not contain a response assertions") + targetSection.addAfter(null, currentResponse) } private fun extractTestCases(section: Section): List { diff --git a/core/src/test/resources/integration-test-files/aliasing.adoc b/core/src/test/resources/integration-test-files/aliasing.adoc index 90afb89f..6b8bb93f 100644 --- a/core/src/test/resources/integration-test-files/aliasing.adoc +++ b/core/src/test/resources/integration-test-files/aliasing.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID! budget: Int! boxOffice: Float! @@ -28,7 +28,7 @@ CREATE (movie:Movie) [source,graphql,request=true] ---- query ($id: ID!) { - movies(where: {id: $id}) { + movies(where: {id_EQ: $id}) { aliased: id budget boxOffice @@ -82,7 +82,7 @@ RETURN this { [source,graphql,request=true] ---- query ($id: ID!) { - movies(where: {id: $id}) { + movies(where: {id_EQ: $id}) { id aliased: budget boxOffice @@ -136,7 +136,7 @@ RETURN this { [source,graphql,request=true] ---- query ($id: ID!) { - movies(where: {id: $id}) { + movies(where: {id_EQ: $id}) { id budget aliased: boxOffice diff --git a/core/src/test/resources/integration-test-files/aliasing.js.adoc b/core/src/test/resources/integration-test-files/aliasing.js.adoc index d4899c6c..bdaf64a3 100644 --- a/core/src/test/resources/integration-test-files/aliasing.js.adoc +++ b/core/src/test/resources/integration-test-files/aliasing.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID! budget: Int! boxOffice: Float! @@ -29,7 +29,7 @@ CREATE (movie:Movie) [source,graphql,request=true] ---- query ($id: ID!) { - movies(where: {id: $id}) { + movies(where: {id_EQ: $id}) { aliased: id budget boxOffice @@ -81,7 +81,7 @@ RETURN this { .budget, .boxOffice, aliased: this.id } AS this [source,graphql,request=true] ---- query ($id: ID!) { - movies(where: {id: $id}) { + movies(where: {id_EQ: $id}) { id aliased: budget boxOffice @@ -133,7 +133,7 @@ RETURN this { .id, .boxOffice, aliased: this.budget } AS this [source,graphql,request=true] ---- query ($id: ID!) { - movies(where: {id: $id}) { + movies(where: {id_EQ: $id}) { id budget aliased: boxOffice diff --git a/core/src/test/resources/integration-test-files/config-options/query-options.adoc b/core/src/test/resources/integration-test-files/config-options/query-options.adoc index 228fe9c6..a856133a 100644 --- a/core/src/test/resources/integration-test-files/config-options/query-options.adoc +++ b/core/src/test/resources/integration-test-files/config-options/query-options.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String movies: [Movie!]! @relationship(type: "ACTED_IN", direction: IN) } -type Movie { +type Movie @node { id: ID! title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -32,7 +32,7 @@ CREATE (:Movie {id: "RandomString1"}), (:Movie {id: "RandomString1"}), (:Movie { [source,graphql,request=true] ---- query ($id: ID) { - movies(where: {id: $id}) { + movies(where: {id_EQ: $id}) { id } } diff --git a/core/src/test/resources/integration-test-files/config-options/query-options.js.adoc b/core/src/test/resources/integration-test-files/config-options/query-options.js.adoc index e8c1356e..d32cb158 100644 --- a/core/src/test/resources/integration-test-files/config-options/query-options.js.adoc +++ b/core/src/test/resources/integration-test-files/config-options/query-options.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String movies: [Movie!]! @relationship(type: "ACTED_IN", direction: IN) } -type Movie { +type Movie @node { id: ID! title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -33,7 +33,7 @@ CREATE (:Movie {id: "RandomString1"}), (:Movie {id: "RandomString1"}), (:Movie { [source,graphql,request=true] ---- query ($id: ID) { - movies(where: {id: $id}) { + movies(where: {id_EQ: $id}) { id } } diff --git a/core/src/test/resources/integration-test-files/connection-resolvers.adoc b/core/src/test/resources/integration-test-files/connection-resolvers.adoc index 1b9f4ac0..a8ce3f61 100644 --- a/core/src/test/resources/integration-test-files/connection-resolvers.adoc +++ b/core/src/test/resources/integration-test-files/connection-resolvers.adoc @@ -8,13 +8,13 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { id: ID name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } -type Movie { +type Movie @node { id: ID title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") @@ -37,7 +37,7 @@ CREATE (:Movie { id: "RandomString1" }) [source,graphql,request=true] ---- query GetMovie($movieId: ID) { - movies(where: {id: $movieId}) { + movies(where: {id_EQ: $movieId}) { id actorsConnection { totalCount diff --git a/core/src/test/resources/integration-test-files/connection-resolvers.js.adoc b/core/src/test/resources/integration-test-files/connection-resolvers.js.adoc index d2cd18a5..a35c25e4 100644 --- a/core/src/test/resources/integration-test-files/connection-resolvers.js.adoc +++ b/core/src/test/resources/integration-test-files/connection-resolvers.js.adoc @@ -9,13 +9,13 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { id: ID name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } -type Movie { +type Movie @node { id: ID title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") @@ -38,7 +38,7 @@ CREATE (:Movie { id: "RandomString1" }) [source,graphql,request=true] ---- query GetMovie($movieId: ID) { - movies(where: {id: $movieId}) { + movies(where: {id_EQ: $movieId}) { id actorsConnection { totalCount diff --git a/core/src/test/resources/integration-test-files/connections/alias.adoc b/core/src/test/resources/integration-test-files/connections/alias.adoc index 49bf02e9..c43e2d5a 100644 --- a/core/src/test/resources/integration-test-files/connections/alias.adoc +++ b/core/src/test/resources/integration-test-files/connections/alias.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -32,7 +32,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { actors: actorsConnection { totalCount } @@ -99,12 +99,12 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -123,7 +123,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { actorsConnection { count: totalCount } @@ -190,12 +190,12 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -214,7 +214,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { actorsConnection { pi: pageInfo { hasNextPage @@ -285,12 +285,12 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -309,7 +309,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { actorsConnection { pageInfo { sc: startCursor @@ -380,12 +380,12 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -404,7 +404,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { actorsConnection { pageInfo { ec: endCursor @@ -475,12 +475,12 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -499,7 +499,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { actorsConnection { pageInfo { hPP: hasPreviousPage @@ -570,12 +570,12 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -594,7 +594,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { actorsConnection(first: 1) { pageInfo { hNP: hasNextPage @@ -666,12 +666,12 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -690,7 +690,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { actorsConnection(first: 1) { e: edges { cursor @@ -762,12 +762,12 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -786,7 +786,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { actorsConnection(first: 1) { edges { c: cursor @@ -858,12 +858,12 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -882,7 +882,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { actorsConnection(first: 1) { edges { n: node { @@ -951,12 +951,12 @@ movies[0].actorsConnection.edges[0].n.name,notEmpty, .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -975,7 +975,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { actorsConnection(first: 1) { edges { node { @@ -1044,12 +1044,12 @@ movies[0].actorsConnection.edges[0].node.n,notEmpty, .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } @@ -1072,7 +1072,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { actorsConnection(first: 1) { edges { r: properties { @@ -1141,12 +1141,12 @@ movies[0].actorsConnection.edges[0].r.r,notEmpty, .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") } -type Actor { +type Actor @node { name: String! } @@ -1166,7 +1166,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { title connection: actorsConnection { tC: totalCount @@ -1262,12 +1262,12 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Post { +type Post @node { title: String! comments: [Comment!]! @relationship(type: "HAS_COMMENT", direction: OUT) } -type Comment { +type Comment @node { flag: Boolean! post: Post! @relationship(type: "HAS_COMMENT", direction: IN) } @@ -1286,15 +1286,15 @@ CREATE (post:Post {title: "RandomString1"}) [source,graphql,request=true] ---- { - posts(where: {title: "RandomString1"}) { - flagged: commentsConnection(where: {node: {flag: true}}) { + posts(where: {title_EQ: "RandomString1"}) { + flagged: commentsConnection(where: {node: {flag_EQ: true}}) { edges { node { flag } } } - unflagged: commentsConnection(where: {node: {flag: false}}) { + unflagged: commentsConnection(where: {node: {flag_EQ: false}}) { edges { node { flag @@ -1408,12 +1408,12 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } @@ -1435,16 +1435,16 @@ CREATE (movie:Movie {title: "The Matrix"}) [source,graphql,request=true] ---- { - movies(where: {title: "The Matrix"}) { + movies(where: {title_EQ: "The Matrix"}) { title - actorsConnection(where: {node: {name: "Keanu Reeves"}}) { + actorsConnection(where: {node: {name_EQ: "Keanu Reeves"}}) { edges { properties { screenTime } node { name - b: moviesConnection(where: {node: {title: "The Matrix"}}) { + b: moviesConnection(where: {node: {title_EQ: "The Matrix"}}) { edges { node { title diff --git a/core/src/test/resources/integration-test-files/connections/alias.js.adoc b/core/src/test/resources/integration-test-files/connections/alias.js.adoc index bab7450f..177b449a 100644 --- a/core/src/test/resources/integration-test-files/connections/alias.js.adoc +++ b/core/src/test/resources/integration-test-files/connections/alias.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -33,7 +33,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { actors: actorsConnection { totalCount } @@ -89,12 +89,12 @@ RETURN this { actors: var3 } AS this .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -113,7 +113,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { actorsConnection { count: totalCount } @@ -169,12 +169,12 @@ RETURN this { actorsConnection: var3 } AS this .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -193,7 +193,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { actorsConnection { pi: pageInfo { hasNextPage @@ -253,12 +253,12 @@ RETURN this { actorsConnection: var3 } AS this .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -277,7 +277,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { actorsConnection { pageInfo { sc: startCursor @@ -337,12 +337,12 @@ RETURN this { actorsConnection: var3 } AS this .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -361,7 +361,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { actorsConnection { pageInfo { ec: endCursor @@ -421,12 +421,12 @@ RETURN this { actorsConnection: var3 } AS this .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -445,7 +445,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { actorsConnection { pageInfo { hPP: hasPreviousPage @@ -505,12 +505,12 @@ RETURN this { actorsConnection: var3 } AS this .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -529,7 +529,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { actorsConnection(first: 1) { pageInfo { hNP: hasNextPage @@ -593,12 +593,12 @@ RETURN this { actorsConnection: var3 } AS this .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -617,7 +617,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { actorsConnection(first: 1) { e: edges { cursor @@ -683,12 +683,12 @@ RETURN this { actorsConnection: var3 } AS this .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -707,7 +707,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { actorsConnection(first: 1) { edges { c: cursor @@ -773,12 +773,12 @@ RETURN this { actorsConnection: var3 } AS this .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -797,7 +797,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { actorsConnection(first: 1) { edges { n: node { @@ -852,7 +852,7 @@ RETURN this { actorsConnection: var3 } AS this "edges": [ { "n": { - "name": "C" + "name": "A" } } ] @@ -867,12 +867,12 @@ RETURN this { actorsConnection: var3 } AS this .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -891,7 +891,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { actorsConnection(first: 1) { edges { node { @@ -961,12 +961,12 @@ RETURN this { actorsConnection: var3 } AS this .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } @@ -989,7 +989,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { actorsConnection(first: 1) { edges { r: properties { @@ -1045,7 +1045,7 @@ RETURN this { actorsConnection: var3 } AS this { "r": { "r": [ - "R1" + "R2" ] } } @@ -1061,12 +1061,12 @@ RETURN this { actorsConnection: var3 } AS this .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") } -type Actor { +type Actor @node { name: String! } @@ -1086,7 +1086,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { title connection: actorsConnection { tC: totalCount @@ -1170,12 +1170,12 @@ RETURN this { .title, connection: var3 } AS this .Schema [source,graphql,schema=true] ---- -type Post { +type Post @node { title: String! comments: [Comment!]! @relationship(type: "HAS_COMMENT", direction: OUT) } -type Comment { +type Comment @node { flag: Boolean! post: Post! @relationship(type: "HAS_COMMENT", direction: IN) } @@ -1194,15 +1194,15 @@ CREATE (post:Post {title: "RandomString1"}) [source,graphql,request=true] ---- { - posts(where: {title: "RandomString1"}) { - flagged: commentsConnection(where: {node: {flag: true}}) { + posts(where: {title_EQ: "RandomString1"}) { + flagged: commentsConnection(where: {node: {flag_EQ: true}}) { edges { node { flag } } } - unflagged: commentsConnection(where: {node: {flag: false}}) { + unflagged: commentsConnection(where: {node: {flag_EQ: false}}) { edges { node { flag @@ -1298,12 +1298,12 @@ RETURN this { flagged: var3, unflagged: var7 } AS this .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } @@ -1325,16 +1325,16 @@ CREATE (movie:Movie {title: "The Matrix"}) [source,graphql,request=true] ---- { - movies(where: {title: "The Matrix"}) { + movies(where: {title_EQ: "The Matrix"}) { title - actorsConnection(where: {node: {name: "Keanu Reeves"}}) { + actorsConnection(where: {node: {name_EQ: "Keanu Reeves"}}) { edges { properties { screenTime } node { name - b: moviesConnection(where: {node: {title: "The Matrix"}}) { + b: moviesConnection(where: {node: {title_EQ: "The Matrix"}}) { edges { node { title diff --git a/core/src/test/resources/integration-test-files/connections/filtering.adoc b/core/src/test/resources/integration-test-files/connections/filtering.adoc index c5aeb8d2..96d1cc8a 100644 --- a/core/src/test/resources/integration-test-files/connections/filtering.adoc +++ b/core/src/test/resources/integration-test-files/connections/filtering.adoc @@ -8,17 +8,307 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } ---- +== allows for NOT boolean operators on nested connections filters + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (movie:Movie {title: "My title"}) + CREATE (actorOne:Actor {name: "Arthur"}) + CREATE (actorTwo:Actor {name: "Zaphod"}) + CREATE (actorOne)-[:ACTED_IN]->(movie)<-[:ACTED_IN]-(actorTwo) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {actorsConnection_SOME: {NOT: {node: {name_EQ: "Arthur"}}}}) { + actorsConnection { + edges { + node { + name + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Arthur" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE EXISTS { + MATCH (this0:Actor)-[edge0:ACTED_IN]->(this) + WHERE NOT (this0.name = $param0) +} +CALL { + WITH this + MATCH (actor0:Actor)-[actedIn0:ACTED_IN]->(this) + WITH collect( { + node: actor0, + relationship: actedIn0 + }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS actor0, edge.relationship AS actedIn0 + RETURN collect( { + node: { + __typename: 'Actor', + name: actor0.name + } + }) AS actorsConnectionEdges + } + RETURN { + edges: actorsConnectionEdges, + totalCount: totalCount + } AS actorsConnection +} +RETURN this { + actorsConnection: actorsConnection +} AS this +---- + +.GraphQL-Response +[source,json,response=true,ignore-order] +---- +{ + "movies" : [ { + "actorsConnection" : { + "edges" : [ { + "node" : { + "name" : "Arthur" + } + }, { + "node" : { + "name" : "Zaphod" + } + } ] + } + } ] +} +---- + +== allows for OR boolean operators on nested connections filters + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (movie:Movie {title: "My title"}) + CREATE (actorOne:Actor {name: "Arthur"}) + CREATE (actorTwo:Actor {name: "Zaphod"}) + CREATE (actorOne)-[:ACTED_IN]->(movie)<-[:ACTED_IN]-(actorTwo) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies( + where: {actorsConnection_SOME: {OR: [{node: {name_EQ: "Arthur"}}, {node: {name_EQ: "Zaphod"}}]}} + ) { + actorsConnection { + edges { + node { + name + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Arthur", + "param1" : "Zaphod" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE EXISTS { + MATCH (this0:Actor)-[edge0:ACTED_IN]->(this) + WHERE (this0.name = $param0 + OR this0.name = $param1) +} +CALL { + WITH this + MATCH (actor0:Actor)-[actedIn0:ACTED_IN]->(this) + WITH collect( { + node: actor0, + relationship: actedIn0 + }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS actor0, edge.relationship AS actedIn0 + RETURN collect( { + node: { + __typename: 'Actor', + name: actor0.name + } + }) AS actorsConnectionEdges + } + RETURN { + edges: actorsConnectionEdges, + totalCount: totalCount + } AS actorsConnection +} +RETURN this { + actorsConnection: actorsConnection +} AS this +---- + +.GraphQL-Response +[source,json,response=true,ignore-order] +---- +{ + "movies" : [ { + "actorsConnection" : { + "edges" : [ { + "node" : { + "name" : "Arthur" + } + }, { + "node" : { + "name" : "Zaphod" + } + } ] + } + } ] +} +---- + +== should allow where clause on relationship property of node + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (movie:Movie {title: "My title"}) + CREATE (actorOne:Actor {name: "Arthur"}) + CREATE (actorTwo:Actor {name: "Zaphod"}) + CREATE (actorOne)-[:ACTED_IN]->(movie)<-[:ACTED_IN]-(actorTwo) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +query ($movieTitle: String!) { + movies(where: {title_EQ: $movieTitle}) { + actorsConnection(where: {node: {movies_SOME: {title_EQ: $movieTitle}}}) { + edges { + node { + name + } + } + } + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "movieTitle" : "My title" +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "My title", + "param1" : "My title" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.title = $param0 +CALL { + WITH this + MATCH (actor0:Actor)-[actedIn0:ACTED_IN]->(this) + WHERE EXISTS { + MATCH (actor0)-[:ACTED_IN]->(actor00:Movie) + WHERE actor00.title = $param1 + } + WITH collect( { + node: actor0, + relationship: actedIn0 + }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS actor0, edge.relationship AS actedIn0 + RETURN collect( { + node: { + __typename: 'Actor', + name: actor0.name + } + }) AS actorsConnectionEdges + } + RETURN { + edges: actorsConnectionEdges, + totalCount: totalCount + } AS actorsConnection +} +RETURN this { + actorsConnection: actorsConnection +} AS this +---- + +.GraphQL-Response +[source,json,response=true,ignore-order] +---- +{ + "movies" : [ { + "actorsConnection" : { + "edges" : [ { + "node" : { + "name" : "Arthur" + } + }, { + "node" : { + "name" : "Zaphod" + } + } ] + } + } ] +} +---- + == allows for NOT boolean operators on connection projection filters .Test Data @@ -35,7 +325,7 @@ CREATE (movie:Movie {title: "My title"}) ---- { movies { - actorsConnection(where: {NOT: {node: {name: "Arthur"}}}) { + actorsConnection(where: {NOT: {node: {name_EQ: "Arthur"}}}) { edges { node { name diff --git a/core/src/test/resources/integration-test-files/connections/filtering.js.adoc b/core/src/test/resources/integration-test-files/connections/filtering.js.adoc index d5b1c212..9c943d85 100644 --- a/core/src/test/resources/integration-test-files/connections/filtering.js.adoc +++ b/core/src/test/resources/integration-test-files/connections/filtering.js.adoc @@ -9,17 +9,282 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } ---- +== should allow where clause on relationship property of node + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (movie:Movie {title: "My title"}) + CREATE (actorOne:Actor {name: "Arthur"}) + CREATE (actorTwo:Actor {name: "Zaphod"}) + CREATE (actorOne)-[:ACTED_IN]->(movie)<-[:ACTED_IN]-(actorTwo) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +query ($movieTitle: String!) { + movies(where: {title_EQ: $movieTitle}) { + actorsConnection(where: {node: {movies_SOME: {title_EQ: $movieTitle}}}) { + edges { + node { + name + } + } + } + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "movieTitle": "My title" +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "My title", + "param1": "My title" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.title = $param0 +CALL { + WITH this + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) + WHERE EXISTS { + MATCH (this1)-[:ACTED_IN]->(this2:Movie) + WHERE this2.title = $param1 + } + WITH collect({ node: this1, relationship: this0 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1, edge.relationship AS this0 + RETURN collect({ node: { name: this1.name, __typename: "Actor" } }) AS var3 + } + RETURN { edges: var3, totalCount: totalCount } AS var4 +} +RETURN this { actorsConnection: var4 } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [ + { + "actorsConnection": { + "edges": [ + { + "node": { + "name": "Arthur" + } + }, + { + "node": { + "name": "Zaphod" + } + } + ] + } + } + ] +} +---- + +== allows for OR boolean operators on nested connections filters + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (movie:Movie {title: "My title"}) + CREATE (actorOne:Actor {name: "Arthur"}) + CREATE (actorTwo:Actor {name: "Zaphod"}) + CREATE (actorOne)-[:ACTED_IN]->(movie)<-[:ACTED_IN]-(actorTwo) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies( + where: {actorsConnection_SOME: {OR: [{node: {name_EQ: "Arthur"}}, {node: {name_EQ: "Zaphod"}}]}} + ) { + actorsConnection { + edges { + node { + name + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Arthur", + "param1": "Zaphod" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE EXISTS { + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) + WHERE (this1.name = $param0 OR this1.name = $param1) +} +CALL { + WITH this + MATCH (this)<-[this2:ACTED_IN]-(this3:Actor) + WITH collect({ node: this3, relationship: this2 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this3, edge.relationship AS this2 + RETURN collect({ node: { name: this3.name, __typename: "Actor" } }) AS var4 + } + RETURN { edges: var4, totalCount: totalCount } AS var5 +} +RETURN this { actorsConnection: var5 } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [ + { + "actorsConnection": { + "edges": [ + { + "node": { + "name": "Arthur" + } + }, + { + "node": { + "name": "Zaphod" + } + } + ] + } + } + ] +} +---- + +== allows for NOT boolean operators on nested connections filters + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (movie:Movie {title: "My title"}) + CREATE (actorOne:Actor {name: "Arthur"}) + CREATE (actorTwo:Actor {name: "Zaphod"}) + CREATE (actorOne)-[:ACTED_IN]->(movie)<-[:ACTED_IN]-(actorTwo) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {actorsConnection_SOME: {NOT: {node: {name_EQ: "Arthur"}}}}) { + actorsConnection { + edges { + node { + name + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Arthur" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE EXISTS { + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) + WHERE NOT (this1.name = $param0) +} +CALL { + WITH this + MATCH (this)<-[this2:ACTED_IN]-(this3:Actor) + WITH collect({ node: this3, relationship: this2 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this3, edge.relationship AS this2 + RETURN collect({ node: { name: this3.name, __typename: "Actor" } }) AS var4 + } + RETURN { edges: var4, totalCount: totalCount } AS var5 +} +RETURN this { actorsConnection: var5 } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [ + { + "actorsConnection": { + "edges": [ + { + "node": { + "name": "Arthur" + } + }, + { + "node": { + "name": "Zaphod" + } + } + ] + } + } + ] +} +---- + == allows for NOT boolean operators on connection projection filters .Test Data @@ -36,7 +301,7 @@ CREATE (movie:Movie {title: "My title"}) ---- { movies { - actorsConnection(where: {NOT: {node: {name: "Arthur"}}}) { + actorsConnection(where: {NOT: {node: {name_EQ: "Arthur"}}}) { edges { node { name diff --git a/core/src/test/resources/integration-test-files/connections/interfaces.adoc b/core/src/test/resources/integration-test-files/connections/interfaces.adoc index c4894238..bded83bd 100644 --- a/core/src/test/resources/integration-test-files/connections/interfaces.adoc +++ b/core/src/test/resources/integration-test-files/connections/interfaces.adoc @@ -12,12 +12,12 @@ interface Production { title: String! } -type Movie implements Production { +type Movie implements Production @node { title: String! runtime: Int! } -type Series implements Production { +type Series implements Production @node { title: String! episodes: Int! } @@ -26,7 +26,7 @@ type ActedIn @relationshipProperties { screenTime: Int! } -type Actor { +type Actor @node { name: String! actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } @@ -47,7 +47,7 @@ CREATE (actor:Actor {name: "Jason Momoa"}) [source,graphql,request=true] ---- query Actors($name: String) { - actors(where: {name: $name}) { + actors(where: {name_EQ: $name}) { name actedInConnection { edges { @@ -180,9 +180,9 @@ RETURN this { [source,graphql,request=true] ---- query Actors($name: String) { - actors(where: {name: $name}) { + actors(where: {name_EQ: $name}) { name - actedInConnection(where: {node: {title: "Game of Thrones"}}) { + actedInConnection(where: {node: {title_EQ: "Game of Thrones"}}) { edges { properties { screenTime @@ -301,7 +301,7 @@ RETURN this { [source,graphql,request=true] ---- query Actors($name: String) { - actors(where: {name: $name}) { + actors(where: {name_EQ: $name}) { name actedInConnection(sort: [{edge: {screenTime: DESC}}]) { edges { @@ -440,7 +440,7 @@ RETURN this { [source,graphql,request=true] ---- query Actors($name: String, $after: String) { - actors(where: {name: $name}) { + actors(where: {name_EQ: $name}) { name actedInConnection(first: 2, after: $after, sort: {edge: {screenTime: DESC}}) { pageInfo { @@ -582,7 +582,7 @@ RETURN this { [source,graphql,request=true] ---- query Actors($name: String, $after: String) { - actors(where: {name: $name}) { + actors(where: {name_EQ: $name}) { name actedInConnection(first: 2, after: $after, sort: {edge: {screenTime: DESC}}) { pageInfo { @@ -718,9 +718,9 @@ RETURN this { [source,graphql,request=true] ---- query Actors($name: String, $title: String) { - actors(where: {name: $name}) { + actors(where: {name_EQ: $name}) { name - actedInConnection(where: {node: {title: $title}}) { + actedInConnection(where: {node: {title_EQ: $title}}) { edges { properties { screenTime diff --git a/core/src/test/resources/integration-test-files/connections/interfaces.js.adoc b/core/src/test/resources/integration-test-files/connections/interfaces.js.adoc index 15000e57..373ca913 100644 --- a/core/src/test/resources/integration-test-files/connections/interfaces.js.adoc +++ b/core/src/test/resources/integration-test-files/connections/interfaces.js.adoc @@ -13,12 +13,12 @@ interface Production { title: String! } -type Movie implements Production { +type Movie implements Production @node { title: String! runtime: Int! } -type Series implements Production { +type Series implements Production @node { title: String! episodes: Int! } @@ -27,7 +27,7 @@ type ActedIn @relationshipProperties { screenTime: Int! } -type Actor { +type Actor @node { name: String! actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } @@ -48,7 +48,7 @@ CREATE (actor:Actor {name: "Jason Momoa"}) [source,graphql,request=true] ---- query Actors($name: String) { - actors(where: {name: $name}) { + actors(where: {name_EQ: $name}) { name actedInConnection { edges { @@ -160,9 +160,9 @@ RETURN this { .name, actedInConnection: var4 } AS this [source,graphql,request=true] ---- query Actors($name: String) { - actors(where: {name: $name}) { + actors(where: {name_EQ: $name}) { name - actedInConnection(where: {node: {title: "Game of Thrones"}}) { + actedInConnection(where: {node: {title_EQ: "Game of Thrones"}}) { edges { properties { screenTime @@ -258,7 +258,7 @@ RETURN this { .name, actedInConnection: var4 } AS this [source,graphql,request=true] ---- query Actors($name: String) { - actors(where: {name: $name}) { + actors(where: {name_EQ: $name}) { name actedInConnection(sort: [{edge: {screenTime: DESC}}]) { edges { @@ -377,7 +377,7 @@ RETURN this { .name, actedInConnection: var5 } AS this [source,graphql,request=true] ---- query Actors($name: String, $after: String) { - actors(where: {name: $name}) { + actors(where: {name_EQ: $name}) { name actedInConnection(first: 2, after: $after, sort: {edge: {screenTime: DESC}}) { pageInfo { @@ -499,7 +499,7 @@ RETURN this { .name, actedInConnection: var5 } AS this [source,graphql,request=true] ---- query Actors($name: String, $after: String) { - actors(where: {name: $name}) { + actors(where: {name_EQ: $name}) { name actedInConnection(first: 2, after: $after, sort: {edge: {screenTime: DESC}}) { pageInfo { @@ -613,9 +613,9 @@ RETURN this { .name, actedInConnection: var5 } AS this [source,graphql,request=true] ---- query Actors($name: String, $title: String) { - actors(where: {name: $name}) { + actors(where: {name_EQ: $name}) { name - actedInConnection(where: {node: {title: $title}}) { + actedInConnection(where: {node: {title_EQ: $title}}) { edges { properties { screenTime diff --git a/core/src/test/resources/integration-test-files/connections/nested.adoc b/core/src/test/resources/integration-test-files/connections/nested.adoc index 8767d49e..9482a298 100644 --- a/core/src/test/resources/integration-test-files/connections/nested.adoc +++ b/core/src/test/resources/integration-test-files/connections/nested.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } @@ -37,9 +37,9 @@ CREATE (movie:Movie {title: "Forrest Gump"}) [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title - actorsConnection(where: {node: {name: "Tom Hanks"}}) { + actorsConnection(where: {node: {name_EQ: "Tom Hanks"}}) { edges { properties { screenTime @@ -190,16 +190,16 @@ CREATE (movie:Movie {title: "Forrest Gump"}) [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title - actorsConnection(where: {node: {name: "Tom Hanks"}}) { + actorsConnection(where: {node: {name_EQ: "Tom Hanks"}}) { edges { properties { screenTime } node { name - moviesConnection(where: {node: {title: "Forrest Gump"}}) { + moviesConnection(where: {node: {title_EQ: "Forrest Gump"}}) { edges { node { title diff --git a/core/src/test/resources/integration-test-files/connections/nested.js.adoc b/core/src/test/resources/integration-test-files/connections/nested.js.adoc index 78acf72a..6e3c504d 100644 --- a/core/src/test/resources/integration-test-files/connections/nested.js.adoc +++ b/core/src/test/resources/integration-test-files/connections/nested.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } @@ -38,9 +38,9 @@ CREATE (movie:Movie {title: "Forrest Gump"}) [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title - actorsConnection(where: {node: {name: "Tom Hanks"}}) { + actorsConnection(where: {node: {name_EQ: "Tom Hanks"}}) { edges { properties { screenTime @@ -166,16 +166,16 @@ CREATE (movie:Movie {title: "Forrest Gump"}) [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title - actorsConnection(where: {node: {name: "Tom Hanks"}}) { + actorsConnection(where: {node: {name_EQ: "Tom Hanks"}}) { edges { properties { screenTime } node { name - moviesConnection(where: {node: {title: "Forrest Gump"}}) { + moviesConnection(where: {node: {title_EQ: "Forrest Gump"}}) { edges { node { title diff --git a/core/src/test/resources/integration-test-files/connections/unions.adoc b/core/src/test/resources/integration-test-files/connections/unions.adoc index 9484f395..ff52909f 100644 --- a/core/src/test/resources/integration-test-files/connections/unions.adoc +++ b/core/src/test/resources/integration-test-files/connections/unions.adoc @@ -10,17 +10,17 @@ ---- union Publication = Book | Journal -type Author { +type Author @node { name: String! publications: [Publication!]! @relationship(type: "WROTE", direction: OUT, properties: "Wrote") } -type Book { +type Book @node { title: String! author: [Author!]! @relationship(type: "WROTE", direction: IN, properties: "Wrote") } -type Journal { +type Journal @node { subject: String! author: [Author!]! @relationship(type: "WROTE", direction: IN, properties: "Wrote") } @@ -45,7 +45,7 @@ CREATE (author:Author {name: "Charles Dickens"}) [source,graphql,request=true] ---- query ($authorName: String) { - authors(where: {name: $authorName}) { + authors(where: {name_EQ: $authorName}) { name publicationsConnection { edges { @@ -172,7 +172,7 @@ RETURN this { [source,graphql,request=true] ---- query ($authorName: String) { - authors(where: {name: $authorName}) { + authors(where: {name_EQ: $authorName}) { name publicationsConnection(sort: [{edge: {words: ASC}}]) { edges { @@ -305,7 +305,7 @@ RETURN this { [source,graphql,request=true] ---- query ($authorName: String, $after: String) { - authors(where: {name: $authorName}) { + authors(where: {name_EQ: $authorName}) { name publicationsConnection(first: 2, after: $after, sort: [{edge: {words: ASC}}]) { pageInfo { @@ -442,7 +442,7 @@ RETURN this { [source,graphql,request=true] ---- query ($authorName: String, $after: String) { - authors(where: {name: $authorName}) { + authors(where: {name_EQ: $authorName}) { name publicationsConnection(first: 2, after: $after, sort: [{edge: {words: ASC}}]) { pageInfo { @@ -574,7 +574,7 @@ RETURN this { [source,graphql,request=true] ---- query ($authorName: String) { - authors(where: {name: $authorName}) { + authors(where: {name_EQ: $authorName}) { name publicationsConnection { edges { @@ -695,9 +695,9 @@ RETURN this { [source,graphql,request=true] ---- query ($authorName: String, $bookTitle: String) { - authors(where: {name: $authorName}) { + authors(where: {name_EQ: $authorName}) { name - publicationsConnection(where: {Book: {node: {title: $bookTitle}}}) { + publicationsConnection(where: {Book: {node: {title_EQ: $bookTitle}}}) { edges { properties { words @@ -788,16 +788,115 @@ RETURN this { } ---- +== With where argument on node with node not in database + +.GraphQL-Query +[source,graphql,request=true] +---- +query ($authorName: String, $bookTitle: String) { + authors(where: {name_EQ: $authorName}) { + name + publicationsConnection(where: {Book: {node: {NOT: {title_EQ: $bookTitle}}}}) { + edges { + properties { + words + } + node { + ... on Book { + title + } + } + } + } + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "authorName" : "Charles Dickens", + "bookTitle" : "Oliver Twist" +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Charles Dickens", + "param1" : "Oliver Twist" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Author) +WHERE this.name = $param0 +CALL { + WITH this + CALL { + WITH this + MATCH (this)-[wrote0:WROTE]->(book0:Book) + WHERE NOT (book0.title = $param1) + WITH { + properties: { + __typename: 'Wrote', + words: wrote0.words + }, + node: { + __typename: 'Book', + title: book0.title, + __id: elementId(book0) + } + } AS edge + RETURN edge + } + WITH collect(edge) AS edges + WITH edges, size(edges) AS totalCount + RETURN { + edges: edges, + totalCount: totalCount + } AS publicationsConnection +} +RETURN this { + .name, + publicationsConnection: publicationsConnection +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "authors" : [ { + "name" : "Charles Dickens", + "publicationsConnection" : { + "edges" : [ { + "properties" : { + "words" : 30953 + }, + "node" : { + "title" : "A Christmas Carol" + } + } ] + } + } ] +} +---- + == With where argument on all nodes with all in database .GraphQL-Query [source,graphql,request=true] ---- query ($authorName: String, $bookTitle: String, $journalSubject: String) { - authors(where: {name: $authorName}) { + authors(where: {name_EQ: $authorName}) { name publicationsConnection( - where: {Book: {node: {title: $bookTitle}}, Journal: {node: {subject: $journalSubject}}} + where: {Book: {node: {title_EQ: $bookTitle}}, Journal: {node: {subject_EQ: $journalSubject}}} ) { totalCount edges { @@ -921,15 +1020,140 @@ RETURN this { } ---- +== With where argument on all nodes with only one in database + +.GraphQL-Query +[source,graphql,request=true] +---- +query ($authorName: String, $bookTitle: String, $journalSubject: String) { + authors(where: {name_EQ: $authorName}) { + name + publicationsConnection( + where: {Book: {node: {title_EQ: $bookTitle}}, Journal: {node: {NOT: {subject_EQ: $journalSubject}}}} + ) { + totalCount + edges { + properties { + words + } + node { + __typename + ... on Book { + title + } + ... on Journal { + subject + } + } + } + } + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "authorName" : "Charles Dickens", + "bookTitle" : "Oliver Twist", + "journalSubject" : "Master Humphrey's Clock" +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Charles Dickens", + "param1" : "Oliver Twist", + "param2" : "Master Humphrey's Clock" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Author) +WHERE this.name = $param0 +CALL { + WITH this + CALL { + WITH this + MATCH (this)-[wrote0:WROTE]->(book0:Book) + WHERE book0.title = $param1 + WITH { + properties: { + __typename: 'Wrote', + words: wrote0.words + }, + node: { + __typename: 'Book', + title: book0.title, + __id: elementId(book0) + } + } AS edge + RETURN edge UNION + WITH this + MATCH (this)-[wrote1:WROTE]->(journal0:Journal) + WHERE NOT (journal0.subject = $param2) + WITH { + properties: { + __typename: 'Wrote', + words: wrote1.words + }, + node: { + __typename: 'Journal', + subject: journal0.subject, + __id: elementId(journal0) + } + } AS edge + RETURN edge + } + WITH collect(edge) AS edges + WITH edges, size(edges) AS totalCount + RETURN { + edges: edges, + totalCount: totalCount + } AS publicationsConnection +} +RETURN this { + .name, + publicationsConnection: publicationsConnection +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "authors" : [ { + "name" : "Charles Dickens", + "publicationsConnection" : { + "totalCount" : 1, + "edges" : [ { + "properties" : { + "words" : 167543 + }, + "node" : { + "__typename" : "Book", + "title" : "Oliver Twist" + } + } ] + } + } ] +} +---- + == With where argument on relationship with relationship in database .GraphQL-Query [source,graphql,request=true] ---- query ($authorName: String, $bookWordCount: Int) { - authors(where: {name: $authorName}) { + authors(where: {name_EQ: $authorName}) { name - publicationsConnection(where: {Book: {edge: {words: $bookWordCount}}}) { + publicationsConnection(where: {Book: {edge: {words_EQ: $bookWordCount}}}) { edges { properties { words @@ -1020,16 +1244,115 @@ RETURN this { } ---- +== With where argument on relationship with relationship not in database + +.GraphQL-Query +[source,graphql,request=true] +---- +query ($authorName: String, $bookWordCount: Int) { + authors(where: {name_EQ: $authorName}) { + name + publicationsConnection(where: {Book: {edge: {NOT: {words_EQ: $bookWordCount}}}}) { + edges { + properties { + words + } + node { + ... on Book { + title + } + } + } + } + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "authorName" : "Charles Dickens", + "bookWordCount" : 167543 +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Charles Dickens", + "param1" : 167543 +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Author) +WHERE this.name = $param0 +CALL { + WITH this + CALL { + WITH this + MATCH (this)-[wrote0:WROTE]->(book0:Book) + WHERE NOT (wrote0.words = $param1) + WITH { + properties: { + __typename: 'Wrote', + words: wrote0.words + }, + node: { + __typename: 'Book', + title: book0.title, + __id: elementId(book0) + } + } AS edge + RETURN edge + } + WITH collect(edge) AS edges + WITH edges, size(edges) AS totalCount + RETURN { + edges: edges, + totalCount: totalCount + } AS publicationsConnection +} +RETURN this { + .name, + publicationsConnection: publicationsConnection +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "authors" : [ { + "name" : "Charles Dickens", + "publicationsConnection" : { + "edges" : [ { + "properties" : { + "words" : 30953 + }, + "node" : { + "title" : "A Christmas Carol" + } + } ] + } + } ] +} +---- + == With where argument on all edges with all in database .GraphQL-Query [source,graphql,request=true] ---- query ($authorName: String, $bookWordCount: Int, $journalWordCount: Int) { - authors(where: {name: $authorName}) { + authors(where: {name_EQ: $authorName}) { name publicationsConnection( - where: {Book: {edge: {words: $bookWordCount}}, Journal: {edge: {words: $journalWordCount}}} + where: {Book: {edge: {words_EQ: $bookWordCount}}, Journal: {edge: {words_EQ: $journalWordCount}}} ) { totalCount edges { @@ -1153,16 +1476,141 @@ RETURN this { } ---- +== With where argument on all edges with only one in database + +.GraphQL-Query +[source,graphql,request=true] +---- +query ($authorName: String, $bookWordCount: Int, $journalWordCount: Int) { + authors(where: {name_EQ: $authorName}) { + name + publicationsConnection( + where: {Book: {edge: {words_EQ: $bookWordCount}}, Journal: {edge: {NOT: {words_EQ: $journalWordCount}}}} + ) { + totalCount + edges { + properties { + words + } + node { + __typename + ... on Book { + title + } + ... on Journal { + subject + } + } + } + } + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "authorName" : "Charles Dickens", + "bookWordCount" : 167543, + "journalWordCount" : 3413 +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Charles Dickens", + "param1" : 167543, + "param2" : 3413 +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Author) +WHERE this.name = $param0 +CALL { + WITH this + CALL { + WITH this + MATCH (this)-[wrote0:WROTE]->(book0:Book) + WHERE wrote0.words = $param1 + WITH { + properties: { + __typename: 'Wrote', + words: wrote0.words + }, + node: { + __typename: 'Book', + title: book0.title, + __id: elementId(book0) + } + } AS edge + RETURN edge UNION + WITH this + MATCH (this)-[wrote1:WROTE]->(journal0:Journal) + WHERE NOT (wrote1.words = $param2) + WITH { + properties: { + __typename: 'Wrote', + words: wrote1.words + }, + node: { + __typename: 'Journal', + subject: journal0.subject, + __id: elementId(journal0) + } + } AS edge + RETURN edge + } + WITH collect(edge) AS edges + WITH edges, size(edges) AS totalCount + RETURN { + edges: edges, + totalCount: totalCount + } AS publicationsConnection +} +RETURN this { + .name, + publicationsConnection: publicationsConnection +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "authors" : [ { + "name" : "Charles Dickens", + "publicationsConnection" : { + "totalCount" : 1, + "edges" : [ { + "properties" : { + "words" : 167543 + }, + "node" : { + "__typename" : "Book", + "title" : "Oliver Twist" + } + } ] + } + } ] +} +---- + == With where argument on relationship and node .GraphQL-Query [source,graphql,request=true] ---- query ($authorName: String, $bookWordCount: Int, $bookTitle: String) { - authors(where: {name: $authorName}) { + authors(where: {name_EQ: $authorName}) { name publicationsConnection( - where: {Book: {edge: {words: $bookWordCount}, node: {title: $bookTitle}}} + where: {Book: {edge: {words_EQ: $bookWordCount}, node: {title_EQ: $bookTitle}}} ) { edges { properties { diff --git a/core/src/test/resources/integration-test-files/connections/unions.js.adoc b/core/src/test/resources/integration-test-files/connections/unions.js.adoc index d016fb4e..9c4bb08a 100644 --- a/core/src/test/resources/integration-test-files/connections/unions.js.adoc +++ b/core/src/test/resources/integration-test-files/connections/unions.js.adoc @@ -11,17 +11,17 @@ ---- union Publication = Book | Journal -type Author { +type Author @node { name: String! publications: [Publication!]! @relationship(type: "WROTE", direction: OUT, properties: "Wrote") } -type Book { +type Book @node { title: String! author: [Author!]! @relationship(type: "WROTE", direction: IN, properties: "Wrote") } -type Journal { +type Journal @node { subject: String! author: [Author!]! @relationship(type: "WROTE", direction: IN, properties: "Wrote") } @@ -46,7 +46,7 @@ CREATE (author:Author {name: "Charles Dickens"}) [source,graphql,request=true] ---- query ($authorName: String) { - authors(where: {name: $authorName}) { + authors(where: {name_EQ: $authorName}) { name publicationsConnection { edges { @@ -119,18 +119,18 @@ RETURN this { .name, publicationsConnection: var4 } AS this "edges": [ { "properties": { - "words": 167543 + "words": 30953 }, "node": { - "title": "Oliver Twist" + "title": "A Christmas Carol" } }, { "properties": { - "words": 30953 + "words": 167543 }, "node": { - "title": "A Christmas Carol" + "title": "Oliver Twist" } }, { @@ -154,7 +154,7 @@ RETURN this { .name, publicationsConnection: var4 } AS this [source,graphql,request=true] ---- query ($authorName: String) { - authors(where: {name: $authorName}) { + authors(where: {name_EQ: $authorName}) { name publicationsConnection(sort: [{edge: {words: ASC}}]) { edges { @@ -269,7 +269,7 @@ RETURN this { .name, publicationsConnection: var5 } AS this [source,graphql,request=true] ---- query ($authorName: String, $after: String) { - authors(where: {name: $authorName}) { + authors(where: {name_EQ: $authorName}) { name publicationsConnection(first: 2, after: $after, sort: [{edge: {words: ASC}}]) { pageInfo { @@ -388,7 +388,7 @@ RETURN this { .name, publicationsConnection: var5 } AS this [source,graphql,request=true] ---- query ($authorName: String, $after: String) { - authors(where: {name: $authorName}) { + authors(where: {name_EQ: $authorName}) { name publicationsConnection(first: 2, after: $after, sort: [{edge: {words: ASC}}]) { pageInfo { @@ -500,7 +500,7 @@ RETURN this { .name, publicationsConnection: var5 } AS this [source,graphql,request=true] ---- query ($authorName: String) { - authors(where: {name: $authorName}) { + authors(where: {name_EQ: $authorName}) { name publicationsConnection { edges { @@ -570,18 +570,18 @@ RETURN this { .name, publicationsConnection: var4 } AS this "edges": [ { "properties": { - "words": 167543 + "words": 30953 }, "node": { - "title": "Oliver Twist" + "title": "A Christmas Carol" } }, { "properties": { - "words": 30953 + "words": 167543 }, "node": { - "title": "A Christmas Carol" + "title": "Oliver Twist" } }, { @@ -603,9 +603,9 @@ RETURN this { .name, publicationsConnection: var4 } AS this [source,graphql,request=true] ---- query ($authorName: String, $bookTitle: String) { - authors(where: {name: $authorName}) { + authors(where: {name_EQ: $authorName}) { name - publicationsConnection(where: {Book: {node: {title: $bookTitle}}}) { + publicationsConnection(where: {Book: {node: {title_EQ: $bookTitle}}}) { edges { properties { words @@ -684,16 +684,103 @@ RETURN this { .name, publicationsConnection: var2 } AS this } ---- +== With where argument on node with node not in database + +.GraphQL-Query +[source,graphql,request=true] +---- +query ($authorName: String, $bookTitle: String) { + authors(where: {name_EQ: $authorName}) { + name + publicationsConnection(where: {Book: {node: {NOT: {title_EQ: $bookTitle}}}}) { + edges { + properties { + words + } + node { + ... on Book { + title + } + } + } + } + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "authorName": "Charles Dickens", + "bookTitle": "Oliver Twist" +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Charles Dickens", + "param1": "Oliver Twist" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Author) +WHERE this.name = $param0 +CALL { + WITH this + CALL { + WITH this + MATCH (this)-[this0:WROTE]->(this1:Book) + WHERE NOT (this1.title = $param1) + WITH { properties: { words: this0.words, __typename: "Wrote" }, node: { __typename: "Book", __id: toString(id(this1)), title: this1.title } } AS edge + RETURN edge + } + WITH collect(edge) AS edges + WITH edges, size(edges) AS totalCount + RETURN { edges: edges, totalCount: totalCount } AS var2 +} +RETURN this { .name, publicationsConnection: var2 } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "authors": [ + { + "name": "Charles Dickens", + "publicationsConnection": { + "edges": [ + { + "properties": { + "words": 30953 + }, + "node": { + "title": "A Christmas Carol" + } + } + ] + } + } + ] +} +---- + == With where argument on all nodes with all in database .GraphQL-Query [source,graphql,request=true] ---- query ($authorName: String, $bookTitle: String, $journalSubject: String) { - authors(where: {name: $authorName}) { + authors(where: {name_EQ: $authorName}) { name publicationsConnection( - where: {Book: {node: {title: $bookTitle}}, Journal: {node: {subject: $journalSubject}}} + where: {Book: {node: {title_EQ: $bookTitle}}, Journal: {node: {subject_EQ: $journalSubject}}} ) { totalCount edges { @@ -797,15 +884,119 @@ RETURN this { .name, publicationsConnection: var4 } AS this } ---- +== With where argument on all nodes with only one in database + +.GraphQL-Query +[source,graphql,request=true] +---- +query ($authorName: String, $bookTitle: String, $journalSubject: String) { + authors(where: {name_EQ: $authorName}) { + name + publicationsConnection( + where: {Book: {node: {title_EQ: $bookTitle}}, Journal: {node: {NOT: {subject_EQ: $journalSubject}}}} + ) { + totalCount + edges { + properties { + words + } + node { + __typename + ... on Book { + title + } + ... on Journal { + subject + } + } + } + } + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "authorName": "Charles Dickens", + "bookTitle": "Oliver Twist", + "journalSubject": "Master Humphrey's Clock" +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Charles Dickens", + "param1": "Oliver Twist", + "param2": "Master Humphrey's Clock" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Author) +WHERE this.name = $param0 +CALL { + WITH this + CALL { + WITH this + MATCH (this)-[this0:WROTE]->(this1:Book) + WHERE this1.title = $param1 + WITH { properties: { words: this0.words, __typename: "Wrote" }, node: { __typename: "Book", __id: toString(id(this1)), title: this1.title } } AS edge + RETURN edge + UNION + WITH this + MATCH (this)-[this2:WROTE]->(this3:Journal) + WHERE NOT (this3.subject = $param2) + WITH { properties: { words: this2.words, __typename: "Wrote" }, node: { __typename: "Journal", __id: toString(id(this3)), subject: this3.subject } } AS edge + RETURN edge + } + WITH collect(edge) AS edges + WITH edges, size(edges) AS totalCount + RETURN { edges: edges, totalCount: totalCount } AS var4 +} +RETURN this { .name, publicationsConnection: var4 } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "authors": [ + { + "name": "Charles Dickens", + "publicationsConnection": { + "totalCount": 1, + "edges": [ + { + "properties": { + "words": 167543 + }, + "node": { + "__typename": "Book", + "title": "Oliver Twist" + } + } + ] + } + } + ] +} +---- + == With where argument on relationship with relationship in database .GraphQL-Query [source,graphql,request=true] ---- query ($authorName: String, $bookWordCount: Int) { - authors(where: {name: $authorName}) { + authors(where: {name_EQ: $authorName}) { name - publicationsConnection(where: {Book: {edge: {words: $bookWordCount}}}) { + publicationsConnection(where: {Book: {edge: {words_EQ: $bookWordCount}}}) { edges { properties { words @@ -884,16 +1075,103 @@ RETURN this { .name, publicationsConnection: var2 } AS this } ---- +== With where argument on relationship with relationship not in database + +.GraphQL-Query +[source,graphql,request=true] +---- +query ($authorName: String, $bookWordCount: Int) { + authors(where: {name_EQ: $authorName}) { + name + publicationsConnection(where: {Book: {edge: {NOT: {words_EQ: $bookWordCount}}}}) { + edges { + properties { + words + } + node { + ... on Book { + title + } + } + } + } + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "authorName": "Charles Dickens", + "bookWordCount": 167543 +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Charles Dickens", + "param1": 167543 +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Author) +WHERE this.name = $param0 +CALL { + WITH this + CALL { + WITH this + MATCH (this)-[this0:WROTE]->(this1:Book) + WHERE NOT (this0.words = $param1) + WITH { properties: { words: this0.words, __typename: "Wrote" }, node: { __typename: "Book", __id: toString(id(this1)), title: this1.title } } AS edge + RETURN edge + } + WITH collect(edge) AS edges + WITH edges, size(edges) AS totalCount + RETURN { edges: edges, totalCount: totalCount } AS var2 +} +RETURN this { .name, publicationsConnection: var2 } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "authors": [ + { + "name": "Charles Dickens", + "publicationsConnection": { + "edges": [ + { + "properties": { + "words": 30953 + }, + "node": { + "title": "A Christmas Carol" + } + } + ] + } + } + ] +} +---- + == With where argument on all edges with all in database .GraphQL-Query [source,graphql,request=true] ---- query ($authorName: String, $bookWordCount: Int, $journalWordCount: Int) { - authors(where: {name: $authorName}) { + authors(where: {name_EQ: $authorName}) { name publicationsConnection( - where: {Book: {edge: {words: $bookWordCount}}, Journal: {edge: {words: $journalWordCount}}} + where: {Book: {edge: {words_EQ: $bookWordCount}}, Journal: {edge: {words_EQ: $journalWordCount}}} ) { totalCount edges { @@ -997,16 +1275,120 @@ RETURN this { .name, publicationsConnection: var4 } AS this } ---- +== With where argument on all edges with only one in database + +.GraphQL-Query +[source,graphql,request=true] +---- +query ($authorName: String, $bookWordCount: Int, $journalWordCount: Int) { + authors(where: {name_EQ: $authorName}) { + name + publicationsConnection( + where: {Book: {edge: {words_EQ: $bookWordCount}}, Journal: {edge: {NOT: {words_EQ: $journalWordCount}}}} + ) { + totalCount + edges { + properties { + words + } + node { + __typename + ... on Book { + title + } + ... on Journal { + subject + } + } + } + } + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "authorName": "Charles Dickens", + "bookWordCount": 167543, + "journalWordCount": 3413 +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Charles Dickens", + "param1": 167543, + "param2": 3413 +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Author) +WHERE this.name = $param0 +CALL { + WITH this + CALL { + WITH this + MATCH (this)-[this0:WROTE]->(this1:Book) + WHERE this0.words = $param1 + WITH { properties: { words: this0.words, __typename: "Wrote" }, node: { __typename: "Book", __id: toString(id(this1)), title: this1.title } } AS edge + RETURN edge + UNION + WITH this + MATCH (this)-[this2:WROTE]->(this3:Journal) + WHERE NOT (this2.words = $param2) + WITH { properties: { words: this2.words, __typename: "Wrote" }, node: { __typename: "Journal", __id: toString(id(this3)), subject: this3.subject } } AS edge + RETURN edge + } + WITH collect(edge) AS edges + WITH edges, size(edges) AS totalCount + RETURN { edges: edges, totalCount: totalCount } AS var4 +} +RETURN this { .name, publicationsConnection: var4 } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "authors": [ + { + "name": "Charles Dickens", + "publicationsConnection": { + "totalCount": 1, + "edges": [ + { + "properties": { + "words": 167543 + }, + "node": { + "__typename": "Book", + "title": "Oliver Twist" + } + } + ] + } + } + ] +} +---- + == With where argument on relationship and node .GraphQL-Query [source,graphql,request=true] ---- query ($authorName: String, $bookWordCount: Int, $bookTitle: String) { - authors(where: {name: $authorName}) { + authors(where: {name_EQ: $authorName}) { name publicationsConnection( - where: {Book: {edge: {words: $bookWordCount}, node: {title: $bookTitle}}} + where: {Book: {edge: {words_EQ: $bookWordCount}, node: {title_EQ: $bookTitle}}} ) { edges { properties { diff --git a/core/src/test/resources/integration-test-files/custom-resolvers.adoc b/core/src/test/resources/integration-test-files/custom-resolvers.adoc index bd0966d1..6bca3332 100644 --- a/core/src/test/resources/integration-test-files/custom-resolvers.adoc +++ b/core/src/test/resources/integration-test-files/custom-resolvers.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID custom: String } @@ -39,7 +39,7 @@ type Query { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID custom: String } diff --git a/core/src/test/resources/integration-test-files/custom-resolvers.js.adoc b/core/src/test/resources/integration-test-files/custom-resolvers.js.adoc index acd40d4a..e68d74c6 100644 --- a/core/src/test/resources/integration-test-files/custom-resolvers.js.adoc +++ b/core/src/test/resources/integration-test-files/custom-resolvers.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID custom: String } @@ -40,7 +40,7 @@ type Query { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID custom: String } diff --git a/core/src/test/resources/integration-test-files/custom-scalar-filtering.adoc b/core/src/test/resources/integration-test-files/custom-scalar-filtering.adoc deleted file mode 100644 index 00b83496..00000000 --- a/core/src/test/resources/integration-test-files/custom-scalar-filtering.adoc +++ /dev/null @@ -1,313 +0,0 @@ -:toc: -:toclevels: 42 - -= Custom Scalar Filtering - -== Single Value Custom Scalar - -=== Setup - -.Schema -[source,graphql,schema=true] ----- -scalar CustomScalar - -type Movie { - property: CustomScalar -} ----- - -=== Filter IN CustomScalar - expect return value - -.Test Data -[source,cypher,test-data=true] ----- -CREATE (:Movie {property: "someValue"}) ----- - -.GraphQL-Query -[source,graphql,request=true] ----- -{ - movies(where: {property_IN: ["someValue", "foo", "bar"]}) { - property - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ - "param0" : [ "someValue", "foo", "bar" ] -} ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:Movie) -WHERE this.property IN $param0 -RETURN this { - .property -} AS this ----- - -.GraphQL-Response -[source,json,response=true] ----- -{ - "movies" : [ { - "property" : "someValue" - } ] -} ----- - -=== Filter IN CustomScalar - expect array of return values - -.Test Data -[source,cypher,test-data=true] ----- -CREATE (:Movie {property: "someValue"}) - CREATE (:Movie {property: "someOtherValue"}) - CREATE (:Movie {property: "foo"}) ----- - -.GraphQL-Query -[source,graphql,request=true] ----- -{ - movies(where: {property_IN: ["someValue", "someOtherValue"]}) { - property - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ - "param0" : [ "someValue", "someOtherValue" ] -} ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:Movie) -WHERE this.property IN $param0 -RETURN this { - .property -} AS this ----- - -.GraphQL-Response -[source,json,response=true,ignore-order] ----- -{ - "movies" : [ { - "property" : "someValue" - }, { - "property" : "someOtherValue" - } ] -} ----- - -=== Filter IN CustomScalar - expect no return values - -.Test Data -[source,cypher,test-data=true] ----- -CREATE (:Movie {property: "someValue"}) ----- - -.GraphQL-Query -[source,graphql,request=true] ----- -{ - movies(where: {property_IN: ["someUnknownValue"]}) { - property - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ - "param0" : [ "someUnknownValue" ] -} ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:Movie) -WHERE this.property IN $param0 -RETURN this { - .property -} AS this ----- - -.GraphQL-Response -[source,json,response=true] ----- -{ - "movies" : [ ] -} ----- - -== List Custom Scalar Filtering - -=== Setup - -.Schema -[source,graphql,schema=true] ----- -scalar CustomListScalar - -type Movie { - property: [CustomListScalar!] -} ----- - -=== Filter INCLUDES CustomListScalar - expect return value - -.Test Data -[source,cypher,test-data=true] ----- -CREATE (:Movie {property: ["val1", "val2", "val3"]}) - CREATE (:Movie {property: ["foo", "bar"]}) ----- - -.GraphQL-Query -[source,graphql,request=true] ----- -{ - movies(where: {property_INCLUDES: val1}) { - property - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ - "param0" : "val1" -} ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:Movie) -WHERE $param0 IN this.property -RETURN this { - .property -} AS this ----- - -.GraphQL-Response -[source,json,response=true,ignore-order] ----- -{ - "movies" : [ { - "property" : [ "val1", "val2", "val3" ] - } ] -} ----- - -=== Filter INCLUDES CustomListScalar - expect array of return values - -.Test Data -[source,cypher,test-data=true] ----- -CREATE (:Movie {property: ["val1", "val2", "val3"]}) - CREATE (:Movie {property: ["val1"]}) - CREATE (:Movie {property: ["foo", "bar"]}) ----- - -.GraphQL-Query -[source,graphql,request=true] ----- -{ - movies(where: {property_INCLUDES: val1}) { - property - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ - "param0" : "val1" -} ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:Movie) -WHERE $param0 IN this.property -RETURN this { - .property -} AS this ----- - -.GraphQL-Response -[source,json,response=true,ignore-order] ----- -{ - "movies" : [ { - "property" : [ "val1", "val2", "val3" ] - }, { - "property" : [ "val1" ] - } ] -} ----- - -=== Filter INCLUDES CustomListScalar - expect no return values - -.Test Data -[source,cypher,test-data=true] ----- -CREATE (:Movie {property: ["val1", "val2", "val3"]}) ----- - -.GraphQL-Query -[source,graphql,request=true] ----- -{ - movies(where: {property_INCLUDES: f}) { - property - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ - "param0" : "f" -} ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:Movie) -WHERE $param0 IN this.property -RETURN this { - .property -} AS this ----- - -.GraphQL-Response -[source,json,response=true] ----- -{ - "movies" : [ ] -} ----- diff --git a/core/src/test/resources/integration-test-files/custom-scalar-filtering.js.adoc b/core/src/test/resources/integration-test-files/custom-scalar-filtering.js.adoc deleted file mode 100644 index ef3a0430..00000000 --- a/core/src/test/resources/integration-test-files/custom-scalar-filtering.js.adoc +++ /dev/null @@ -1,331 +0,0 @@ -// This file was generated by the Test-Case extractor of neo4j-graphql -:toc: -:toclevels: 42 - -= Custom Scalar Filtering - -== Single Value Custom Scalar - -=== Setup - -.Schema -[source,graphql,schema=true] ----- -scalar CustomScalar - -type Movie { - property: CustomScalar -} ----- - -=== Filter IN CustomScalar - expect return value - -.Test Data -[source,cypher,test-data=true] ----- -CREATE (:Movie {property: "someValue"}) ----- - -.GraphQL-Query -[source,graphql,request=true] ----- -{ - movies(where: {property_IN: ["someValue", "foo", "bar"]}) { - property - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ - "param0": [ - "someValue", - "foo", - "bar" - ] -} ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:Movie) -WHERE this.property IN $param0 -RETURN this { .property } AS this ----- - -.GraphQL-Response -[source,json,response=true] ----- -{ - "movies": [ - { - "property": "someValue" - } - ] -} ----- - -=== Filter IN CustomScalar - expect array of return values - -.Test Data -[source,cypher,test-data=true] ----- -CREATE (:Movie {property: "someValue"}) - CREATE (:Movie {property: "someOtherValue"}) - CREATE (:Movie {property: "foo"}) ----- - -.GraphQL-Query -[source,graphql,request=true] ----- -{ - movies(where: {property_IN: ["someValue", "someOtherValue"]}) { - property - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ - "param0": [ - "someValue", - "someOtherValue" - ] -} ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:Movie) -WHERE this.property IN $param0 -RETURN this { .property } AS this ----- - -.GraphQL-Response -[source,json,response=true] ----- -{ - "movies": [ - { - "property": "someOtherValue" - }, - { - "property": "someValue" - } - ] -} ----- - -=== Filter IN CustomScalar - expect no return values - -.Test Data -[source,cypher,test-data=true] ----- -CREATE (:Movie {property: "someValue"}) ----- - -.GraphQL-Query -[source,graphql,request=true] ----- -{ - movies(where: {property_IN: ["someUnknownValue"]}) { - property - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ - "param0": [ - "someUnknownValue" - ] -} ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:Movie) -WHERE this.property IN $param0 -RETURN this { .property } AS this ----- - -.GraphQL-Response -[source,json,response=true] ----- -{ - "movies": [] -} ----- - -== List Custom Scalar Filtering - -=== Setup - -.Schema -[source,graphql,schema=true] ----- -scalar CustomListScalar - -type Movie { - property: [CustomListScalar!] -} ----- - -=== Filter INCLUDES CustomListScalar - expect return value - -.Test Data -[source,cypher,test-data=true] ----- -CREATE (:Movie {property: ["val1", "val2", "val3"]}) - CREATE (:Movie {property: ["foo", "bar"]}) ----- - -.GraphQL-Query -[source,graphql,request=true] ----- -{ - movies(where: {property_INCLUDES: val1}) { - property - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ - "param0": "val1" -} ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:Movie) -WHERE $param0 IN this.property -RETURN this { .property } AS this ----- - -.GraphQL-Response -[source,json,response=true] ----- -{ - "movies": [ - { - "property": [ - "val1", - "val2", - "val3" - ] - } - ] -} ----- - -=== Filter INCLUDES CustomListScalar - expect array of return values - -.Test Data -[source,cypher,test-data=true] ----- -CREATE (:Movie {property: ["val1", "val2", "val3"]}) - CREATE (:Movie {property: ["val1"]}) - CREATE (:Movie {property: ["foo", "bar"]}) ----- - -.GraphQL-Query -[source,graphql,request=true] ----- -{ - movies(where: {property_INCLUDES: val1}) { - property - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ - "param0": "val1" -} ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:Movie) -WHERE $param0 IN this.property -RETURN this { .property } AS this ----- - -.GraphQL-Response -[source,json,response=true] ----- -{ - "movies": [ - { - "property": [ - "val1", - "val2", - "val3" - ] - }, - { - "property": [ - "val1" - ] - } - ] -} ----- - -=== Filter INCLUDES CustomListScalar - expect no return values - -.Test Data -[source,cypher,test-data=true] ----- -CREATE (:Movie {property: ["val1", "val2", "val3"]}) ----- - -.GraphQL-Query -[source,graphql,request=true] ----- -{ - movies(where: {property_INCLUDES: f}) { - property - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ - "param0": "f" -} ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:Movie) -WHERE $param0 IN this.property -RETURN this { .property } AS this ----- - -.GraphQL-Response -[source,json,response=true] ----- -{ - "movies": [] -} ----- diff --git a/core/src/test/resources/integration-test-files/deprecations/implicit-eq-filtering.adoc b/core/src/test/resources/integration-test-files/deprecations/implicit-eq-filtering.adoc new file mode 100644 index 00000000..49db7308 --- /dev/null +++ b/core/src/test/resources/integration-test-files/deprecations/implicit-eq-filtering.adoc @@ -0,0 +1,561 @@ +:toc: +:toclevels: 42 + += Implicit _EQ filtering + +== the deprecated implicit _EQ should correctly apply filters for string types + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + property: String +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie { property: "Matrix" }) + CREATE (:Movie { property: "Matrix 2" }) + CREATE (:Movie { property: "Matrix 3" }) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {property: "Matrix"}) { + property + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Matrix" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.property = $param0 +RETURN this { + .property +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies" : [ { + "property" : "Matrix" + } ] +} +---- + +== the deprecated implicit _EQ should correctly apply filters for string types + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + property: ID +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie { property: "z121039" }) + CREATE (:Movie { property: "a10239" }) + CREATE (:Movie { property: "b12389" }) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {property: "z121039"}) { + property + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "z121039" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.property = $param0 +RETURN this { + .property +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies" : [ { + "property" : "z121039" + } ] +} +---- + +== the deprecated implicit _EQ should correctly apply filters for numerical types + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + property: Int +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie { property: 1999999 }) + CREATE (:Movie { property: 1000000 }) + CREATE (:Movie { property: 2999999 }) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {property: 1999999}) { + property + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : 1999999 +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.property = $param0 +RETURN this { + .property +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies" : [ { + "property" : 1999999 + } ] +} +---- + +== the deprecated implicit _EQ should correctly apply filters for numerical types + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + property: Float +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie { property: 1.19 }) + CREATE (:Movie { property: 1.2 }) + CREATE (:Movie { property: 2.3 }) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {property: 1.19}) { + property + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : 1.19 +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.property = $param0 +RETURN this { + .property +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies" : [ { + "property" : 1.19 + } ] +} +---- + +== the deprecated implicit _EQ should correctly apply filters for Date type + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + property: Date +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie { property: date("2024-05-28")}) + CREATE (:Movie { property: date("2025-01-15")}) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {property: "2024-05-28"}) { + property + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "2024-05-28" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.property = $param0 +RETURN this { + .property +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies" : [ { + "property" : "2024-05-28" + } ] +} +---- + +== the deprecated implicit _EQ should correctly apply filters for BigInt type + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + property: BigInt +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie { property: 1999999 }) + CREATE (:Movie { property: 1000000 }) + CREATE (:Movie { property: 2999999 }) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {property: "1999999"}) { + property + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : 1999999 +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.property = $param0 +RETURN this { + .property +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies" : [ { + "property" : "1999999" + } ] +} +---- + +== implicit _EQ on relationship filter + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + title: String +} + +type Actor @node { + name: String + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") +} + +type ActedIn @relationshipProperties { + role: String +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (m1:Movie { title: "The Matrix" }) + CREATE (m2:Movie { title: "The Matrix 2" }) + CREATE (m3:Movie { title: "The Matrix 3" }) + CREATE (k:Actor { name: "Keanu Reeves" }) + CREATE (c:Actor { name: "Carrie-Anne Moss" }) + CREATE (k)-[:ACTED_IN { role: "Neo" }]->(m1) + CREATE (k)-[:ACTED_IN { role: "Neo" }]->(m2) + CREATE (k)-[:ACTED_IN { role: "Neo" }]->(m3) + CREATE (c)-[:ACTED_IN { role: "Trinity" }]->(m1) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + actors(where: {movies_SOME: {title: "The Matrix 2"}}) { + name + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "The Matrix 2" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Actor) +WHERE EXISTS { + MATCH (this)-[:ACTED_IN]->(this0:Movie) + WHERE this0.title = $param0 +} +RETURN this { + .name +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "actors" : [ { + "name" : "Keanu Reeves" + } ] +} +---- + +== implicit _EQ on connection filter + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + title: String +} + +type Actor @node { + name: String + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") +} + +type ActedIn @relationshipProperties { + role: String +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (m1:Movie { title: "The Matrix" }) + CREATE (m2:Movie { title: "The Matrix 2" }) + CREATE (m3:Movie { title: "The Matrix 3" }) + CREATE (k:Actor { name: "Keanu Reeves" }) + CREATE (c:Actor { name: "Carrie-Anne Moss" }) + CREATE (k)-[:ACTED_IN { role: "Neo" }]->(m1) + CREATE (k)-[:ACTED_IN { role: "Neo" }]->(m2) + CREATE (k)-[:ACTED_IN { role: "Neo" }]->(m3) + CREATE (c)-[:ACTED_IN { role: "Trinity" }]->(m1) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + actors(where: {moviesConnection_SOME: {node: {title: "The Matrix 2"}}}) { + name + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "The Matrix 2" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Actor) +WHERE EXISTS { + MATCH (this)-[edge0:ACTED_IN]->(this0:Movie) + WHERE this0.title = $param0 +} +RETURN this { + .name +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "actors" : [ { + "name" : "Keanu Reeves" + } ] +} +---- + +== implicit _EQ on relationship properties filter + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + title: String +} + +type Actor @node { + name: String + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") +} + +type ActedIn @relationshipProperties { + role: String +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (m1:Movie { title: "The Matrix" }) + CREATE (m2:Movie { title: "The Matrix 2" }) + CREATE (m3:Movie { title: "The Matrix 3" }) + CREATE (k:Actor { name: "Keanu Reeves" }) + CREATE (c:Actor { name: "Carrie-Anne Moss" }) + CREATE (k)-[:ACTED_IN { role: "Neo" }]->(m1) + CREATE (k)-[:ACTED_IN { role: "Neo" }]->(m2) + CREATE (k)-[:ACTED_IN { role: "Neo" }]->(m3) + CREATE (c)-[:ACTED_IN { role: "Trinity" }]->(m1) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + actors(where: {moviesConnection_SOME: {edge: {role: "Trinity"}}}) { + name + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Trinity" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Actor) +WHERE EXISTS { + MATCH (this)-[edge0:ACTED_IN]->(this0:Movie) + WHERE edge0.role = $param0 +} +RETURN this { + .name +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "actors" : [ { + "name" : "Carrie-Anne Moss" + } ] +} +---- diff --git a/core/src/test/resources/integration-test-files/deprecations/implicit-eq-filtering.js.adoc b/core/src/test/resources/integration-test-files/deprecations/implicit-eq-filtering.js.adoc new file mode 100644 index 00000000..9ebe1081 --- /dev/null +++ b/core/src/test/resources/integration-test-files/deprecations/implicit-eq-filtering.js.adoc @@ -0,0 +1,562 @@ +// This file was generated by the Test-Case extractor of neo4j-graphql +:toc: +:toclevels: 42 + += Implicit _EQ filtering + +== the deprecated implicit _EQ should correctly apply filters for string types + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + property: String +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie { property: "Matrix" }) + CREATE (:Movie { property: "Matrix 2" }) + CREATE (:Movie { property: "Matrix 3" }) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {property: "Matrix"}) { + property + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Matrix" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.property = $param0 +RETURN this { .property } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [ + { + "property": "Matrix" + } + ] +} +---- + +== the deprecated implicit _EQ should correctly apply filters for string types + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + property: ID +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie { property: "z121039" }) + CREATE (:Movie { property: "a10239" }) + CREATE (:Movie { property: "b12389" }) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {property: "z121039"}) { + property + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "z121039" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.property = $param0 +RETURN this { .property } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [ + { + "property": "z121039" + } + ] +} +---- + +== the deprecated implicit _EQ should correctly apply filters for numerical types + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + property: Int +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie { property: 1999999 }) + CREATE (:Movie { property: 1000000 }) + CREATE (:Movie { property: 2999999 }) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {property: 1999999}) { + property + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": 1999999 +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.property = $param0 +RETURN this { .property } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [ + { + "property": 1999999 + } + ] +} +---- + +== the deprecated implicit _EQ should correctly apply filters for numerical types + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + property: Float +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie { property: 1.19 }) + CREATE (:Movie { property: 1.2 }) + CREATE (:Movie { property: 2.3 }) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {property: 1.19}) { + property + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": 1.19 +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.property = $param0 +RETURN this { .property } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [ + { + "property": 1.19 + } + ] +} +---- + +== the deprecated implicit _EQ should correctly apply filters for Date type + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + property: Date +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie { property: date("2024-05-28")}) + CREATE (:Movie { property: date("2025-01-15")}) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {property: "2024-05-28"}) { + property + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "2024-05-28" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.property = $param0 +RETURN this { .property } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [ + { + "property": "2024-05-28" + } + ] +} +---- + +== the deprecated implicit _EQ should correctly apply filters for BigInt type + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + property: BigInt +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie { property: 1999999 }) + CREATE (:Movie { property: 1000000 }) + CREATE (:Movie { property: 2999999 }) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {property: "1999999"}) { + property + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": 1999999 +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.property = $param0 +RETURN this { .property } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [ + { + "property": "1999999" + } + ] +} +---- + +== implicit _EQ on relationship filter + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + title: String +} + +type Actor @node { + name: String + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") +} + +type ActedIn @relationshipProperties { + role: String +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (m1:Movie { title: "The Matrix" }) + CREATE (m2:Movie { title: "The Matrix 2" }) + CREATE (m3:Movie { title: "The Matrix 3" }) + CREATE (k:Actor { name: "Keanu Reeves" }) + CREATE (c:Actor { name: "Carrie-Anne Moss" }) + CREATE (k)-[:ACTED_IN { role: "Neo" }]->(m1) + CREATE (k)-[:ACTED_IN { role: "Neo" }]->(m2) + CREATE (k)-[:ACTED_IN { role: "Neo" }]->(m3) + CREATE (c)-[:ACTED_IN { role: "Trinity" }]->(m1) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + actors(where: {movies_SOME: {title: "The Matrix 2"}}) { + name + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "The Matrix 2" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Actor) +WHERE EXISTS { + MATCH (this)-[:ACTED_IN]->(this0:Movie) + WHERE this0.title = $param0 +} +RETURN this { .name } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "actors": [ + { + "name": "Keanu Reeves" + } + ] +} +---- + +== implicit _EQ on connection filter + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + title: String +} + +type Actor @node { + name: String + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") +} + +type ActedIn @relationshipProperties { + role: String +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (m1:Movie { title: "The Matrix" }) + CREATE (m2:Movie { title: "The Matrix 2" }) + CREATE (m3:Movie { title: "The Matrix 3" }) + CREATE (k:Actor { name: "Keanu Reeves" }) + CREATE (c:Actor { name: "Carrie-Anne Moss" }) + CREATE (k)-[:ACTED_IN { role: "Neo" }]->(m1) + CREATE (k)-[:ACTED_IN { role: "Neo" }]->(m2) + CREATE (k)-[:ACTED_IN { role: "Neo" }]->(m3) + CREATE (c)-[:ACTED_IN { role: "Trinity" }]->(m1) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + actors(where: {moviesConnection_SOME: {node: {title: "The Matrix 2"}}}) { + name + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "The Matrix 2" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Actor) +WHERE EXISTS { + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) + WHERE this1.title = $param0 +} +RETURN this { .name } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "actors": [ + { + "name": "Keanu Reeves" + } + ] +} +---- + +== implicit _EQ on relationship properties filter + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + title: String +} + +type Actor @node { + name: String + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") +} + +type ActedIn @relationshipProperties { + role: String +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (m1:Movie { title: "The Matrix" }) + CREATE (m2:Movie { title: "The Matrix 2" }) + CREATE (m3:Movie { title: "The Matrix 3" }) + CREATE (k:Actor { name: "Keanu Reeves" }) + CREATE (c:Actor { name: "Carrie-Anne Moss" }) + CREATE (k)-[:ACTED_IN { role: "Neo" }]->(m1) + CREATE (k)-[:ACTED_IN { role: "Neo" }]->(m2) + CREATE (k)-[:ACTED_IN { role: "Neo" }]->(m3) + CREATE (c)-[:ACTED_IN { role: "Trinity" }]->(m1) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + actors(where: {moviesConnection_SOME: {edge: {role: "Trinity"}}}) { + name + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Trinity" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Actor) +WHERE EXISTS { + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) + WHERE this0.role = $param0 +} +RETURN this { .name } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "actors": [ + { + "name": "Carrie-Anne Moss" + } + ] +} +---- diff --git a/core/src/test/resources/integration-test-files/directives/authorization/custom-resolvers.adoc b/core/src/test/resources/integration-test-files/directives/authorization/custom-resolvers.adoc index e44d8dff..ccb5e8b3 100644 --- a/core/src/test/resources/integration-test-files/directives/authorization/custom-resolvers.adoc +++ b/core/src/test/resources/integration-test-files/directives/authorization/custom-resolvers.adoc @@ -10,7 +10,7 @@ .Schema [source,graphql,schema=true] ---- -type User { +type User @node { id: ID } @@ -44,7 +44,7 @@ type Query { .Schema [source,graphql,schema=true] ---- -type User { +type User @node { id: ID } @@ -78,7 +78,7 @@ mutation { .Schema [source,graphql,schema=true] ---- -type User { +type User @node { customId: ID } @@ -112,7 +112,7 @@ type Query { .Schema [source,graphql,schema=true] ---- -type User { +type User @node { id: ID } @@ -140,3 +140,17 @@ type Query { } } ---- + +.Query Context +[source,json,query-config=true] +---- +{ + "contextParams" : { + "jwt" : { + "sub" : "RandomString1", + "name" : "John Doe", + "iat" : 1516239022 + } + } +} +---- diff --git a/core/src/test/resources/integration-test-files/directives/authorization/custom-resolvers.js.adoc b/core/src/test/resources/integration-test-files/directives/authorization/custom-resolvers.js.adoc index 49da1ef0..73ba6f2e 100644 --- a/core/src/test/resources/integration-test-files/directives/authorization/custom-resolvers.js.adoc +++ b/core/src/test/resources/integration-test-files/directives/authorization/custom-resolvers.js.adoc @@ -11,7 +11,7 @@ .Schema [source,graphql,schema=true] ---- -type User { +type User @node { id: ID } @@ -45,7 +45,7 @@ type Query { .Schema [source,graphql,schema=true] ---- -type User { +type User @node { id: ID } @@ -79,7 +79,7 @@ mutation { .Schema [source,graphql,schema=true] ---- -type User { +type User @node { customId: ID } @@ -113,7 +113,7 @@ type Query { .Schema [source,graphql,schema=true] ---- -type User { +type User @node { id: ID } @@ -132,6 +132,20 @@ type Query { } ---- +.Query Context +[source,json,query-config=true] +---- +{ + "contextParams": { + "jwt": { + "sub": "RandomString1", + "name": "John Doe", + "iat": 1516239022 + } + } +} +---- + .GraphQL-Response [source,json,response=true] ---- diff --git a/core/src/test/resources/integration-test-files/directives/coalesce.adoc b/core/src/test/resources/integration-test-files/directives/coalesce.adoc index cbdd24bb..02cfdf93 100644 --- a/core/src/test/resources/integration-test-files/directives/coalesce.adoc +++ b/core/src/test/resources/integration-test-files/directives/coalesce.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID! classification: String @coalesce(value: "Unrated") } @@ -24,7 +24,7 @@ CREATE (:Movie {id: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {classification: "Unrated"}) { + movies(where: {classification_EQ: "Unrated"}) { id classification } @@ -71,7 +71,7 @@ enum Status { INACTIVE } -type Movie { +type Movie @node { id: ID status: Status @coalesce(value: ACTIVE) } @@ -87,7 +87,7 @@ CREATE (:Movie {id: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {status: ACTIVE}) { + movies(where: {status_EQ: ACTIVE}) { id status } @@ -134,7 +134,7 @@ enum Status { INACTIVE } -type Movie { +type Movie @node { id: ID statuses: [Status!] @coalesce(value: [ACTIVE, INACTIVE]) } @@ -150,7 +150,7 @@ CREATE (:Movie {id: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {statuses: [ACTIVE, INACTIVE]}) { + movies(where: {statuses_EQ: [ACTIVE, INACTIVE]}) { id statuses } diff --git a/core/src/test/resources/integration-test-files/directives/coalesce.js.adoc b/core/src/test/resources/integration-test-files/directives/coalesce.js.adoc index 3fda70e4..5447b8ab 100644 --- a/core/src/test/resources/integration-test-files/directives/coalesce.js.adoc +++ b/core/src/test/resources/integration-test-files/directives/coalesce.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID! classification: String @coalesce(value: "Unrated") } @@ -25,7 +25,7 @@ CREATE (:Movie {id: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {classification: "Unrated"}) { + movies(where: {classification_EQ: "Unrated"}) { id classification } @@ -71,7 +71,7 @@ enum Status { INACTIVE } -type Movie { +type Movie @node { id: ID status: Status @coalesce(value: ACTIVE) } @@ -87,7 +87,7 @@ CREATE (:Movie {id: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {status: ACTIVE}) { + movies(where: {status_EQ: ACTIVE}) { id status } @@ -133,7 +133,7 @@ enum Status { INACTIVE } -type Movie { +type Movie @node { id: ID statuses: [Status!] @coalesce(value: [ACTIVE, INACTIVE]) } @@ -149,7 +149,7 @@ CREATE (:Movie {id: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {statuses: [ACTIVE, INACTIVE]}) { + movies(where: {statuses_EQ: [ACTIVE, INACTIVE]}) { id statuses } diff --git a/core/src/test/resources/integration-test-files/directives/customResolver.adoc b/core/src/test/resources/integration-test-files/directives/customResolver.adoc index 5ace268b..f07d4680 100644 --- a/core/src/test/resources/integration-test-files/directives/customResolver.adoc +++ b/core/src/test/resources/integration-test-files/directives/customResolver.adoc @@ -10,7 +10,7 @@ .Schema [source,graphql,schema=true] ---- -type User { +type User @node { id: ID! firstName: String! lastName: String! @@ -36,7 +36,7 @@ include::../../../kotlin/org/neo4j/graphql/custom_resolver/ScalarFieldCustomReso [source,graphql,request=true] ---- query User($userId: ID!) { - users(where: {id: $userId}) { + users(where: {id_EQ: $userId}) { id firstName lastName @@ -92,7 +92,7 @@ RETURN this { [source,graphql,request=true] ---- query User($userId: ID!) { - users(where: {id: $userId}) { + users(where: {id_EQ: $userId}) { id fullName } @@ -144,7 +144,7 @@ RETURN this { [source,graphql,request=true] ---- query User($userId: ID!) { - users(where: {id: $userId}) { + users(where: {id_EQ: $userId}) { id f: firstName fullName @@ -200,12 +200,12 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Address { +type Address @node { street: String! city: String! } -type User { +type User @node { id: ID! firstName: String! lastName: String! @@ -276,12 +276,12 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Address { +type Address @node { street: String! city: String! } -type User { +type User @node { id: ID! firstName: String! lastName: String! @@ -364,12 +364,12 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Address { +type Address @node { street: String! city: String! } -type User { +type User @node { id: ID! firstName: String! lastName: String! @@ -460,12 +460,12 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Address { +type Address @node { street: String! city: String! } -type User { +type User @node { id: ID! firstName: String! lastName: String! @@ -556,17 +556,17 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type City { +type City @node { name: String! population: Int } -type Address { +type Address @node { street: String! city: City! @relationship(type: "IN_CITY", direction: OUT) } -type User { +type User @node { id: ID! firstName: String! lastName: String! @@ -661,22 +661,22 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type State { +type State @node { someValue: Int! } -type City { +type City @node { name: String! population: Int state: State! @relationship(type: "IN_STATE", direction: OUT) } -type Address { +type Address @node { street: String! city: City! @relationship(type: "IN_CITY", direction: OUT) } -type User { +type User @node { id: ID! firstName: String! lastName: String! @@ -784,18 +784,18 @@ RETURN this { ---- union Publication = Book | Journal -type Author { +type Author @node { name: String! publications: [Publication!]! @relationship(type: "WROTE", direction: OUT) publicationsWithAuthor: [String!]! @customResolver(requires: "name publications { ...on Book { title } ... on Journal { subject } }") } -type Book { +type Book @node { title: String! author: Author! @relationship(type: "WROTE", direction: IN) } -type Journal { +type Journal @node { subject: String! author: Author! @relationship(type: "WROTE", direction: IN) } @@ -883,17 +883,17 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type City { +type City @node { name: String! population: Int @alias(property: "cityPopulation") } -type Address { +type Address @node { street: String! city: City! @relationship(type: "IN_CITY", direction: OUT) } -type User { +type User @node { id: ID! firstName: String! @alias(property: "first") lastName: String! @@ -995,19 +995,19 @@ interface Publication { publicationYear: Int! } -type Author { +type Author @node { name: String! publications: [Publication!]! @relationship(type: "WROTE", direction: OUT) publicationsWithAuthor: [String!]! @customResolver(requires: "name publications { publicationYear ...on Book { title } ... on Journal { subject } }") } -type Book implements Publication { +type Book implements Publication @node { title: String! publicationYear: Int! author: [Author!]! @relationship(type: "WROTE", direction: IN) } -type Journal implements Publication { +type Journal implements Publication @node { subject: String! publicationYear: Int! author: [Author!]! @relationship(type: "WROTE", direction: IN) @@ -1100,7 +1100,7 @@ interface Publication { publicationYear: Int! } -type User { +type User @node { id: ID! firstName: String! lastName: String! @@ -1108,18 +1108,18 @@ type User { customResolverField: Int @customResolver(requires: "followedAuthors { name publications { publicationYear ...on Book { title } ... on Journal { subject } } } firstName") } -type Author { +type Author @node { name: String! publications: [Publication!]! @relationship(type: "WROTE", direction: OUT) } -type Book implements Publication { +type Book implements Publication @node { title: String! publicationYear: Int! author: [Author!]! @relationship(type: "WROTE", direction: IN) } -type Journal implements Publication { +type Journal implements Publication @node { subject: String! publicationYear: Int! author: [Author!]! @relationship(type: "WROTE", direction: IN) @@ -1216,7 +1216,7 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type User { +type User @node { id: ID! firstName: String! lastName: String! @@ -1226,17 +1226,17 @@ type User { union Publication = Book | Journal -type Author { +type Author @node { name: String! publications: [Publication!]! @relationship(type: "WROTE", direction: OUT) } -type Book { +type Book @node { title: String! author: Author! @relationship(type: "WROTE", direction: IN) } -type Journal { +type Journal @node { subject: String! author: Author! @relationship(type: "WROTE", direction: IN) } diff --git a/core/src/test/resources/integration-test-files/directives/customResolver.js.adoc b/core/src/test/resources/integration-test-files/directives/customResolver.js.adoc index 3ab3b794..1c38de8d 100644 --- a/core/src/test/resources/integration-test-files/directives/customResolver.js.adoc +++ b/core/src/test/resources/integration-test-files/directives/customResolver.js.adoc @@ -11,7 +11,7 @@ .Schema [source,graphql,schema=true] ---- -type User { +type User @node { id: ID! firstName: String! lastName: String! @@ -31,7 +31,7 @@ CREATE (user:User) SET user = {id: "An-ID", firstName: "someFirstName", lastName [source,graphql,request=true] ---- query User($userId: ID!) { - users(where: {id: $userId}) { + users(where: {id_EQ: $userId}) { id firstName lastName @@ -61,7 +61,7 @@ query User($userId: ID!) { ---- MATCH (this:User) WHERE this.id = $param0 -RETURN this { .id, .firstName, .lastName, .fullName } AS this +RETURN this { .id, .firstName, .lastName } AS this ---- .GraphQL-Response @@ -85,7 +85,7 @@ RETURN this { .id, .firstName, .lastName, .fullName } AS this [source,graphql,request=true] ---- query User($userId: ID!) { - users(where: {id: $userId}) { + users(where: {id_EQ: $userId}) { id fullName } @@ -113,7 +113,7 @@ query User($userId: ID!) { ---- MATCH (this:User) WHERE this.id = $param0 -RETURN this { .id, .fullName, .firstName, .lastName } AS this +RETURN this { .id, .firstName, .lastName } AS this ---- .GraphQL-Response @@ -135,7 +135,7 @@ RETURN this { .id, .fullName, .firstName, .lastName } AS this [source,graphql,request=true] ---- query User($userId: ID!) { - users(where: {id: $userId}) { + users(where: {id_EQ: $userId}) { id f: firstName fullName @@ -164,7 +164,7 @@ query User($userId: ID!) { ---- MATCH (this:User) WHERE this.id = $param0 -RETURN this { .id, .fullName, .firstName, .lastName, f: this.firstName } AS this +RETURN this { .id, .firstName, .lastName, f: this.firstName } AS this ---- .GraphQL-Response @@ -188,12 +188,12 @@ RETURN this { .id, .fullName, .firstName, .lastName, f: this.firstName } AS this .Schema [source,graphql,schema=true] ---- -type Address { +type Address @node { street: String! city: String! } -type User { +type User @node { id: ID! firstName: String! lastName: String! @@ -234,7 +234,7 @@ CALL { WITH this1 { .city } AS this1 RETURN head(collect(this1)) AS var2 } -RETURN this { .fullName, .firstName, .lastName, address: var2 } AS this +RETURN this { .firstName, .lastName, address: var2 } AS this ---- .GraphQL-Response @@ -254,12 +254,12 @@ RETURN this { .fullName, .firstName, .lastName, address: var2 } AS this .Schema [source,graphql,schema=true] ---- -type Address { +type Address @node { street: String! city: String! } -type User { +type User @node { id: ID! firstName: String! lastName: String! @@ -305,7 +305,7 @@ CALL { WITH this1 { .street, .city } AS this1 RETURN head(collect(this1)) AS var2 } -RETURN this { .id, .fullName, .firstName, .lastName, address: var2 } AS this +RETURN this { .id, .firstName, .lastName, address: var2 } AS this ---- .GraphQL-Response @@ -330,12 +330,12 @@ RETURN this { .id, .fullName, .firstName, .lastName, address: var2 } AS this .Schema [source,graphql,schema=true] ---- -type Address { +type Address @node { street: String! city: String! } -type User { +type User @node { id: ID! firstName: String! lastName: String! @@ -382,7 +382,7 @@ CALL { WITH this1 { .street, .city } AS this1 RETURN head(collect(this1)) AS var2 } -RETURN this { .id, .fullName, .firstName, .lastName, address: var2 } AS this +RETURN this { .id, .firstName, .lastName, address: var2 } AS this ---- .GraphQL-Response @@ -415,12 +415,12 @@ RETURN this { .id, .fullName, .firstName, .lastName, address: var2 } AS this .Schema [source,graphql,schema=true] ---- -type Address { +type Address @node { street: String! city: String! } -type User { +type User @node { id: ID! firstName: String! lastName: String! @@ -467,7 +467,7 @@ CALL { WITH this1 { .street, .city } AS this1 RETURN head(collect(this1)) AS var2 } -RETURN this { .id, .fullName, .firstName, .lastName, address: var2 } AS this +RETURN this { .id, .firstName, .lastName, address: var2 } AS this ---- .GraphQL-Response @@ -500,17 +500,17 @@ RETURN this { .id, .fullName, .firstName, .lastName, address: var2 } AS this .Schema [source,graphql,schema=true] ---- -type City { +type City @node { name: String! population: Int } -type Address { +type Address @node { street: String! city: City! @relationship(type: "IN_CITY", direction: OUT) } -type User { +type User @node { id: ID! firstName: String! lastName: String! @@ -563,7 +563,7 @@ CALL { WITH this1 { .street, city: var4 } AS this1 RETURN head(collect(this1)) AS var5 } -RETURN this { .fullName, .firstName, .lastName, address: var5 } AS this +RETURN this { .firstName, .lastName, address: var5 } AS this ---- .GraphQL-Response @@ -592,22 +592,22 @@ RETURN this { .fullName, .firstName, .lastName, address: var5 } AS this .Schema [source,graphql,schema=true] ---- -type State { +type State @node { someValue: Int! } -type City { +type City @node { name: String! population: Int state: State! @relationship(type: "IN_STATE", direction: OUT) } -type Address { +type Address @node { street: String! city: City! @relationship(type: "IN_CITY", direction: OUT) } -type User { +type User @node { id: ID! firstName: String! lastName: String! @@ -668,7 +668,7 @@ CALL { WITH this1 { .street, city: var7 } AS this1 RETURN head(collect(this1)) AS var8 } -RETURN this { .fullName, .firstName, .lastName, address: var8 } AS this +RETURN this { .firstName, .lastName, address: var8 } AS this ---- .GraphQL-Response @@ -699,18 +699,18 @@ RETURN this { .fullName, .firstName, .lastName, address: var8 } AS this ---- union Publication = Book | Journal -type Author { +type Author @node { name: String! publications: [Publication!]! @relationship(type: "WROTE", direction: OUT) publicationsWithAuthor: [String!]! @customResolver(requires: "name publications { ...on Book { title } ... on Journal { subject } }") } -type Book { +type Book @node { title: String! author: Author! @relationship(type: "WROTE", direction: IN) } -type Journal { +type Journal @node { subject: String! author: Author! @relationship(type: "WROTE", direction: IN) } @@ -762,7 +762,7 @@ CALL { WITH var2 RETURN collect(var2) AS var2 } -RETURN this { .publicationsWithAuthor, .name, publications: var2 } AS this +RETURN this { .name, publications: var2 } AS this ---- .GraphQL-Response @@ -792,17 +792,17 @@ RETURN this { .publicationsWithAuthor, .name, publications: var2 } AS this .Schema [source,graphql,schema=true] ---- -type City { +type City @node { name: String! population: Int @alias(property: "cityPopulation") } -type Address { +type Address @node { street: String! city: City! @relationship(type: "IN_CITY", direction: OUT) } -type User { +type User @node { id: ID! firstName: String! @alias(property: "first") lastName: String! @@ -856,7 +856,7 @@ CALL { WITH this1 { .street, city: var4 } AS this1 RETURN head(collect(this1)) AS var5 } -RETURN this { .fullName, .lastName, firstName: this.first, address: var5 } AS this +RETURN this { .lastName, firstName: this.first, address: var5 } AS this ---- .GraphQL-Response @@ -865,17 +865,17 @@ RETURN this { .fullName, .lastName, firstName: this.first, address: var5 } AS th { "users": [ { - "firstName": "First", - "fullName": "First Last from city1 name! with population of 8947975", + "firstName": "New First", + "fullName": "New First new-last from city2 name? with population of 74", "address": { - "street": "some street" + "street": "another-street" } }, { - "firstName": "New First", - "fullName": "New First new-last from city2 name? with population of 74", + "firstName": "First", + "fullName": "First Last from city1 name! with population of 8947975", "address": { - "street": "another-street" + "street": "some street" } } ] @@ -891,19 +891,19 @@ interface Publication { publicationYear: Int! } -type Author { +type Author @node { name: String! publications: [Publication!]! @relationship(type: "WROTE", direction: OUT) publicationsWithAuthor: [String!]! @customResolver(requires: "name publications { publicationYear ...on Book { title } ... on Journal { subject } }") } -type Book implements Publication { +type Book implements Publication @node { title: String! publicationYear: Int! author: [Author!]! @relationship(type: "WROTE", direction: IN) } -type Journal implements Publication { +type Journal implements Publication @node { subject: String! publicationYear: Int! author: [Author!]! @relationship(type: "WROTE", direction: IN) @@ -954,7 +954,7 @@ CALL { WITH var2 RETURN collect(var2) AS var2 } -RETURN this { .publicationsWithAuthor, .name, publications: var2 } AS this +RETURN this { .name, publications: var2 } AS this ---- .GraphQL-Response @@ -986,7 +986,7 @@ interface Publication { publicationYear: Int! } -type User { +type User @node { id: ID! firstName: String! lastName: String! @@ -994,18 +994,18 @@ type User { customResolverField: Int @customResolver(requires: "followedAuthors { name publications { publicationYear ...on Book { title } ... on Journal { subject } } } firstName") } -type Author { +type Author @node { name: String! publications: [Publication!]! @relationship(type: "WROTE", direction: OUT) } -type Book implements Publication { +type Book implements Publication @node { title: String! publicationYear: Int! author: [Author!]! @relationship(type: "WROTE", direction: IN) } -type Journal implements Publication { +type Journal implements Publication @node { subject: String! publicationYear: Int! author: [Author!]! @relationship(type: "WROTE", direction: IN) @@ -1063,7 +1063,7 @@ CALL { WITH this1 { .name, publications: var4 } AS this1 RETURN collect(this1) AS var7 } -RETURN this { .customResolverField, .firstName, followedAuthors: var7 } AS this +RETURN this { .firstName, followedAuthors: var7 } AS this ---- .GraphQL-Response @@ -1083,7 +1083,7 @@ RETURN this { .customResolverField, .firstName, followedAuthors: var7 } AS this .Schema [source,graphql,schema=true] ---- -type User { +type User @node { id: ID! firstName: String! lastName: String! @@ -1093,17 +1093,17 @@ type User { union Publication = Book | Journal -type Author { +type Author @node { name: String! publications: [Publication!]! @relationship(type: "WROTE", direction: OUT) } -type Book { +type Book @node { title: String! author: Author! @relationship(type: "WROTE", direction: IN) } -type Journal { +type Journal @node { subject: String! author: Author! @relationship(type: "WROTE", direction: IN) } @@ -1160,7 +1160,7 @@ CALL { WITH this1 { .name, publications: var4 } AS this1 RETURN collect(this1) AS var7 } -RETURN this { .customResolverField, .firstName, followedAuthors: var7 } AS this +RETURN this { .firstName, followedAuthors: var7 } AS this ---- .GraphQL-Response diff --git a/core/src/test/resources/integration-test-files/directives/node/label.adoc b/core/src/test/resources/integration-test-files/directives/node/label.adoc index 3f4943b3..ca5f2131 100644 --- a/core/src/test/resources/integration-test-files/directives/node/label.adoc +++ b/core/src/test/resources/integration-test-files/directives/node/label.adoc @@ -56,3 +56,107 @@ RETURN this { } ] } ---- + +== custom context labels + +.Schema +[source,graphql,schema=true] +---- +type Movie @node(labels: ["$context.filmLabel"]) { + id: ID + title: String +} +---- + +.Query Context +[source,json,query-config=true] +---- +{ + "contextParams" : { + "filmLabel" : "Film" + } +} +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies { + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ } +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Film) +RETURN this { + .title +} AS this +---- + +.GraphQL-Response +[source,json,response=true,ignore-order] +---- +{ + "movies" : [ { + "title" : "The Matrix" + } ] +} +---- + +== custom jwt labels + +CAUTION: This functionality is not jet implemented + +.Schema +[source,graphql,schema=true] +---- +type Movie @node(labels: ["$jwt.filmLabel"]) { + id: ID + title: String +} +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies { + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ } +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Film) +RETURN this { + .title +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies" : [ { + "title" : "The Matrix" + } ] +} +---- diff --git a/core/src/test/resources/integration-test-files/directives/node/label.js.adoc b/core/src/test/resources/integration-test-files/directives/node/label.js.adoc index 6491adc3..7c929943 100644 --- a/core/src/test/resources/integration-test-files/directives/node/label.js.adoc +++ b/core/src/test/resources/integration-test-files/directives/node/label.js.adoc @@ -57,3 +57,105 @@ RETURN this { .title } AS this ] } ---- + +== custom jwt labels + +.Schema +[source,graphql,schema=true] +---- +type Movie @node(labels: ["$jwt.filmLabel"]) { + id: ID + title: String +} +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies { + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Film) +RETURN this { .title } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [ + { + "title": "The Matrix" + } + ] +} +---- + +== custom context labels + +.Schema +[source,graphql,schema=true] +---- +type Movie @node(labels: ["$context.filmLabel"]) { + id: ID + title: String +} +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies { + title + } +} +---- + +.Query Context +[source,json,query-config=true] +---- +{ + "contextParams": { + "filmLabel": "Film" + } +} +---- + +.Expected Cypher params +[source,json] +---- +{} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Film) +RETURN this { .title } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [ + { + "title": "The Matrix" + } + ] +} +---- diff --git a/core/src/test/resources/integration-test-files/directives/relationship/query-direction.adoc b/core/src/test/resources/integration-test-files/directives/relationship/query-direction.adoc new file mode 100644 index 00000000..39b79da0 --- /dev/null +++ b/core/src/test/resources/integration-test-files/directives/relationship/query-direction.adoc @@ -0,0 +1,250 @@ +:toc: +:toclevels: 42 + += query-direction + +== DIRECTED + +=== Setup + +.Schema +[source,graphql,schema=true] +---- +type Person @node { + name: String! + friends: [Person!]! @relationship(type: "HAS_FRIEND", direction: OUT, queryDirection: DIRECTED) +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (stefan:Person { name: "Stefan" }) + CREATE (mike:Person { name: "Mike" }) + CREATE (charlie:Person { name: "Charlie" }) + CREATE (stefan)-[:HAS_FRIEND]->(mike) + CREATE (mike)-[:HAS_FRIEND]->(charlie) +---- + +=== should return related node using the queryDirection DIRECTED + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + people(where: {name: "Mike"}) { + name + friends { + name + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Mike" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Person) +WHERE this.name = $param0 +CALL { + WITH this + MATCH (this)-[hasFriend0:HAS_FRIEND]->(person0:Person) + WITH person0 { + .name + } AS friends + RETURN collect(friends) AS friends +} +RETURN this { + .name, + friends: friends +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "people" : [ { + "name" : "Mike", + "friends" : [ { + "name" : "Charlie" + } ] + } ] +} +---- + +=== should return person with friend named Mike (directed out) + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + people(where: {friends_SOME: {name: "Mike"}}) { + name + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Mike" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Person) +WHERE EXISTS { + MATCH (this)-[:HAS_FRIEND]->(this0:Person) + WHERE this0.name = $param0 +} +RETURN this { + .name +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "people" : [ { + "name" : "Stefan" + } ] +} +---- + +== UNDIRECTED + +=== Setup + +.Schema +[source,graphql,schema=true] +---- +type Person @node { + name: String! + friends: [Person!]! @relationship(type: "HAS_FRIEND", direction: OUT, queryDirection: UNDIRECTED) +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (stefan:Person { name: "Stefan" }) + CREATE (mike:Person { name: "Mike" }) + CREATE (charlie:Person { name: "Charlie" }) + CREATE (stefan)-[:HAS_FRIEND]->(mike) + CREATE (mike)-[:HAS_FRIEND]->(charlie) +---- + +=== should return related node using the queryDirection UNDIRECTED + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + people(where: {name: "Mike"}) { + name + friends { + name + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Mike" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Person) +WHERE this.name = $param0 +CALL { + WITH this + MATCH (this)-[hasFriend0:HAS_FRIEND]-(person0:Person) + WITH person0 { + .name + } AS friends + RETURN collect(friends) AS friends +} +RETURN this { + .name, + friends: friends +} AS this +---- + +.GraphQL-Response +[source,json,response=true,ignore-order] +---- +{ + "people" : [ { + "name" : "Mike", + "friends" : [ { + "name" : "Charlie" + }, { + "name" : "Stefan" + } ] + } ] +} +---- + +=== should return person with friend named Mike (undirected) + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + people(where: {friends_SOME: {name: "Mike"}}) { + name + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Mike" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Person) +WHERE EXISTS { + MATCH (this)-[:HAS_FRIEND]-(this0:Person) + WHERE this0.name = $param0 +} +RETURN this { + .name +} AS this +---- + +.GraphQL-Response +[source,json,response=true,ignore-order] +---- +{ + "people" : [ { + "name" : "Stefan" + }, { + "name" : "Charlie" + } ] +} +---- diff --git a/core/src/test/resources/integration-test-files/directives/relationship/query-direction.js.adoc b/core/src/test/resources/integration-test-files/directives/relationship/query-direction.js.adoc new file mode 100644 index 00000000..c9307f08 --- /dev/null +++ b/core/src/test/resources/integration-test-files/directives/relationship/query-direction.js.adoc @@ -0,0 +1,251 @@ +// This file was generated by the Test-Case extractor of neo4j-graphql +:toc: +:toclevels: 42 + += query-direction + +== DIRECTED + +=== Setup + +.Schema +[source,graphql,schema=true] +---- +type Person @node { + name: String! + friends: [Person!]! @relationship(type: "HAS_FRIEND", direction: OUT, queryDirection: DIRECTED) +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (stefan:Person { name: "Stefan" }) + CREATE (mike:Person { name: "Mike" }) + CREATE (charlie:Person { name: "Charlie" }) + CREATE (stefan)-[:HAS_FRIEND]->(mike) + CREATE (mike)-[:HAS_FRIEND]->(charlie) +---- + +=== should return related node using the queryDirection DIRECTED + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + people(where: {name: "Mike"}) { + name + friends { + name + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Mike" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Person) +WHERE this.name = $param0 +CALL { + WITH this + MATCH (this)-[this0:HAS_FRIEND]->(this1:Person) + WITH this1 { .name } AS this1 + RETURN collect(this1) AS var2 +} +RETURN this { .name, friends: var2 } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "people": [ + { + "name": "Mike", + "friends": [ + { + "name": "Charlie" + } + ] + } + ] +} +---- + +=== should return person with friend named Mike (directed out) + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + people(where: {friends_SOME: {name: "Mike"}}) { + name + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Mike" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Person) +WHERE EXISTS { + MATCH (this)-[:HAS_FRIEND]->(this0:Person) + WHERE this0.name = $param0 +} +RETURN this { .name } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "people": [ + { + "name": "Stefan" + } + ] +} +---- + +== UNDIRECTED + +=== Setup + +.Schema +[source,graphql,schema=true] +---- +type Person @node { + name: String! + friends: [Person!]! @relationship(type: "HAS_FRIEND", direction: OUT, queryDirection: UNDIRECTED) +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (stefan:Person { name: "Stefan" }) + CREATE (mike:Person { name: "Mike" }) + CREATE (charlie:Person { name: "Charlie" }) + CREATE (stefan)-[:HAS_FRIEND]->(mike) + CREATE (mike)-[:HAS_FRIEND]->(charlie) +---- + +=== should return related node using the queryDirection UNDIRECTED + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + people(where: {name: "Mike"}) { + name + friends { + name + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Mike" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Person) +WHERE this.name = $param0 +CALL { + WITH this + MATCH (this)-[this0:HAS_FRIEND]-(this1:Person) + WITH this1 { .name } AS this1 + RETURN collect(this1) AS var2 +} +RETURN this { .name, friends: var2 } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "people": [ + { + "name": "Mike", + "friends": [ + { + "name": "Charlie" + }, + { + "name": "Stefan" + } + ] + } + ] +} +---- + +=== should return person with friend named Mike (undirected) + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + people(where: {friends_SOME: {name: "Mike"}}) { + name + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Mike" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Person) +WHERE EXISTS { + MATCH (this)-[:HAS_FRIEND]-(this0:Person) + WHERE this0.name = $param0 +} +RETURN this { .name } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "people": [ + { + "name": "Stefan" + }, + { + "name": "Charlie" + } + ] +} +---- diff --git a/core/src/test/resources/integration-test-files/field-filtering.adoc b/core/src/test/resources/integration-test-files/field-filtering.adoc new file mode 100644 index 00000000..4fe874ad --- /dev/null +++ b/core/src/test/resources/integration-test-files/field-filtering.adoc @@ -0,0 +1,104 @@ +:toc: +:toclevels: 42 + += field-filtering + +== should use connection filter on field + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + title: String! + genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT) +} + +type Genre @node { + name: String! + series: [Series!]! @relationship(type: "IN_SERIES", direction: OUT) +} + +type Series @node { + name: String! +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (m:Movie {title:"RandomString1"})-[:IN_GENRE]->(:Genre {name:"RandomString2"})-[:IN_SERIES]->(:Series {name:"RandomString4"}) + CREATE (m)-[:IN_GENRE]->(:Genre {name:"RandomString3"}) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {title_EQ: "RandomString1"}) { + title + genres(where: {seriesConnection_SOME: {node: {name_EQ: "RandomString4"}}}) { + name + series { + name + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "RandomString1", + "param1" : "RandomString4" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.title = $param0 +CALL { + WITH this + MATCH (this)-[inGenre0:IN_GENRE]->(genre0:Genre) + WHERE EXISTS { + MATCH (genre0)-[edge0:IN_SERIES]->(genre00:Series) + WHERE genre00.name = $param1 + } + CALL { + WITH genre0 + MATCH (genre0)-[inSeries0:IN_SERIES]->(series0:Series) + WITH series0 { + .name + } AS series + RETURN collect(series) AS series + } + WITH genre0 { + .name, + series: series + } AS genres + RETURN collect(genres) AS genres +} +RETURN this { + .title, + genres: genres +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies" : [ { + "title" : "RandomString1", + "genres" : [ { + "name" : "RandomString2", + "series" : [ { + "name" : "RandomString4" + } ] + } ] + } ] +} +---- diff --git a/core/src/test/resources/integration-test-files/field-filtering.js.adoc b/core/src/test/resources/integration-test-files/field-filtering.js.adoc new file mode 100644 index 00000000..2224a124 --- /dev/null +++ b/core/src/test/resources/integration-test-files/field-filtering.js.adoc @@ -0,0 +1,103 @@ +// This file was generated by the Test-Case extractor of neo4j-graphql +:toc: +:toclevels: 42 + += field-filtering + +== should use connection filter on field + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + title: String! + genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT) +} + +type Genre @node { + name: String! + series: [Series!]! @relationship(type: "IN_SERIES", direction: OUT) +} + +type Series @node { + name: String! +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (m:Movie {title:"RandomString1"})-[:IN_GENRE]->(:Genre {name:"RandomString2"})-[:IN_SERIES]->(:Series {name:"RandomString4"}) + CREATE (m)-[:IN_GENRE]->(:Genre {name:"RandomString3"}) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {title_EQ: "RandomString1"}) { + title + genres(where: {seriesConnection_SOME: {node: {name_EQ: "RandomString4"}}}) { + name + series { + name + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "RandomString1", + "param1": "RandomString4" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.title = $param0 +CALL { + WITH this + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) + WHERE EXISTS { + MATCH (this1)-[this2:IN_SERIES]->(this3:Series) + WHERE this3.name = $param1 + } + CALL { + WITH this1 + MATCH (this1)-[this4:IN_SERIES]->(this5:Series) + WITH this5 { .name } AS this5 + RETURN collect(this5) AS var6 + } + WITH this1 { .name, series: var6 } AS this1 + RETURN collect(this1) AS var7 +} +RETURN this { .title, genres: var7 } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [ + { + "title": "RandomString1", + "genres": [ + { + "name": "RandomString2", + "series": [ + { + "name": "RandomString4" + } + ] + } + ] + } + ] +} +---- diff --git a/core/src/test/resources/integration-test-files/filtering/advanced-filtering.adoc b/core/src/test/resources/integration-test-files/filtering/advanced-filtering.adoc index 399108fc..9246975f 100644 --- a/core/src/test/resources/integration-test-files/filtering/advanced-filtering.adoc +++ b/core/src/test/resources/integration-test-files/filtering/advanced-filtering.adoc @@ -10,7 +10,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { property: ID } ---- @@ -123,6 +123,53 @@ RETURN this { } ---- +=== should find Movies NOT string + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie {property: "RandomString1"}) + CREATE (:Movie {property: "RandomString2"}) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {NOT: {property_EQ: "RandomString2"}}) { + property + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "RandomString2" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE NOT (this.property = $param0) +RETURN this { + .property +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies" : [ { + "property" : "RandomString1" + } ] +} +---- + === should find Movies CONTAINS string .Test Data @@ -284,7 +331,7 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { property: String } ---- @@ -397,6 +444,53 @@ RETURN this { } ---- +=== should find Movies NOT string + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie {property: "RandomString1"}) + CREATE (:Movie {property: "RandomString2"}) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {NOT: {property_EQ: "RandomString2"}}) { + property + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "RandomString2" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE NOT (this.property = $param0) +RETURN this { + .property +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies" : [ { + "property" : "RandomString1" + } ] +} +---- + === should find Movies CONTAINS string .Test Data @@ -558,7 +652,7 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String } ---- @@ -580,6 +674,104 @@ type Movie { } ---- +=== should find Movies EQ string + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie {title: "The Animatrix"}) + CREATE (:Movie {title: "The Matrix"}) + CREATE (:Movie {title: "The Matrix Reloaded"}) + CREATE (:Movie {title: "The Matrix Revolutions"}) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {title_EQ: "The Matrix"}) { + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "The Matrix" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.title = $param0 +RETURN this { + .title +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies" : [ { + "title" : "The Matrix" + } ] +} +---- + +=== should find Movies implicit EQ string + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie {title: "The Animatrix"}) + CREATE (:Movie {title: "The Matrix"}) + CREATE (:Movie {title: "The Matrix Reloaded"}) + CREATE (:Movie {title: "The Matrix Revolutions"}) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {title_EQ: "The Matrix"}) { + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "The Matrix" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.title = $param0 +RETURN this { + .title +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies" : [ { + "title" : "The Matrix" + } ] +} +---- + === should find Movies GT string .Test Data @@ -794,16 +986,6 @@ RETURN this { == Int Filtering -=== Setup - -.Schema -[source,graphql,schema=true] ----- -type Movie { - property: Int -} ----- - === should find Movies IN numbers .Test Data @@ -1042,6 +1224,63 @@ RETURN this { } ---- +=== should find Movies NOT number + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {NOT: {property_EQ: 84}}) { + property + } +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE NOT (this.property = $param0) +RETURN this { + .property +} AS this +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : 84 +} +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies" : [ { + "property" : 42 + } ] +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie {property: 42}) + CREATE (:Movie {property: 84}) +---- + +=== Setup + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + property: Int +} +---- + == Float Filtering === Setup @@ -1049,24 +1288,25 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { property: Float } ---- -=== should find Movies IN numbers +=== should find Movies NOT number .Test Data [source,cypher,test-data=true] ---- CREATE (:Movie {property: 4.2}) + CREATE (:Movie {property: 8.4}) ---- .GraphQL-Query [source,graphql,request=true] ---- { - movies(where: {property_IN: [4.2, 8.4, 6.9]}) { + movies(where: {NOT: {property_EQ: 8.4}}) { property } } @@ -1076,7 +1316,7 @@ CREATE (:Movie {property: 4.2}) [source,json] ---- { - "param0" : [ 4.2, 8.4, 6.9 ] + "param0" : 8.4 } ---- @@ -1084,7 +1324,7 @@ CREATE (:Movie {property: 4.2}) [source,cypher] ---- MATCH (this:Movie) -WHERE this.property IN $param0 +WHERE NOT (this.property = $param0) RETURN this { .property } AS this @@ -1100,20 +1340,19 @@ RETURN this { } ---- -=== should find Movies LT number +=== should find Movies IN numbers .Test Data [source,cypher,test-data=true] ---- CREATE (:Movie {property: 4.2}) - CREATE (:Movie {property: -1}) ---- .GraphQL-Query [source,graphql,request=true] ---- { - movies(where: {property_LT: 0}) { + movies(where: {property_IN: [4.2, 8.4, 6.9]}) { property } } @@ -1123,7 +1362,7 @@ CREATE (:Movie {property: 4.2}) [source,json] ---- { - "param0" : 0 + "param0" : [ 4.2, 8.4, 6.9 ] } ---- @@ -1131,7 +1370,7 @@ CREATE (:Movie {property: 4.2}) [source,cypher] ---- MATCH (this:Movie) -WHERE this.property < $param0 +WHERE this.property IN $param0 RETURN this { .property } AS this @@ -1142,12 +1381,12 @@ RETURN this { ---- { "movies" : [ { - "property" : -1.0 + "property" : 4.2 } ] } ---- -=== should find Movies LTE number +=== should find Movies LT number .Test Data [source,cypher,test-data=true] @@ -1160,7 +1399,54 @@ CREATE (:Movie {property: 4.2}) [source,graphql,request=true] ---- { - movies(where: {property_LTE: 4.2}) { + movies(where: {property_LT: 0}) { + property + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : 0.0 +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.property < $param0 +RETURN this { + .property +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies" : [ { + "property" : -1.0 + } ] +} +---- + +=== should find Movies LTE number + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie {property: 4.2}) + CREATE (:Movie {property: -1}) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {property_LTE: 4.2}) { property } } @@ -1299,7 +1585,7 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { property: Boolean } ---- @@ -1316,7 +1602,7 @@ CREATE (:Movie {property: false}) [source,graphql,request=true] ---- { - movies(where: {property: false}) { + movies(where: {property_EQ: false}) { property } } @@ -1349,3 +1635,694 @@ RETURN this { } ] } ---- + +=== should find Movies NOT boolean + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {NOT: {property_EQ: false}}) { + property + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : false +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE NOT (this.property = $param0) +RETURN this { + .property +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies" : [ ] +} +---- + +== NULL Filtering + +=== Setup + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + id: String! + optional: String +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie {id: "RandomString1"}) + CREATE (:Movie {id: "RandomString2", optional: "RandomString3"}) +---- + +=== should work for non-existence + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {optional_EQ: null}) { + id + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ } +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.optional IS NULL +RETURN this { + .id +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies" : [ { + "id" : "RandomString1" + } ] +} +---- + +=== should work for existence + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {NOT: {optional_EQ: null}}) { + id + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ } +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.optional IS NOT NULL +RETURN this { + .id +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies" : [ { + "id" : "RandomString2" + } ] +} +---- + +== Relationship/Connection Filtering + +=== equality + +==== should find using relationship equality on node + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + id: ID + genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT) +} + +type Genre @node { + id: ID +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (root:Movie {id: "RandomString1"}) + CREATE (:Movie {id: "RandomString3"}) + CREATE (relation:Genre {id: "RandomString2"}) + CREATE (:Genre {id: "RandomString3"}) + MERGE (root)-[:IN_GENRE]->(relation) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {genres_SOME: {id_EQ: "RandomString2"}}) { + id + genres { + id + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "RandomString2" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE EXISTS { + MATCH (this)-[:IN_GENRE]->(this0:Genre) + WHERE this0.id = $param0 +} +CALL { + WITH this + MATCH (this)-[inGenre0:IN_GENRE]->(genre0:Genre) + WITH genre0 { + .id + } AS genres + RETURN collect(genres) AS genres +} +RETURN this { + .id, + genres: genres +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies" : [ { + "id" : "RandomString1", + "genres" : [ { + "id" : "RandomString2" + } ] + } ] +} +---- + +==== should find using equality on node using connection + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + id: ID + genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT) +} + +type Genre @node { + id: ID +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie {id: "RandomString1"})-[:IN_GENRE]->(:Genre {id:"RandomString2"}) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {genresConnection_SOME: {node: {id_EQ: "RandomString2"}}}) { + id + genres { + id + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "RandomString2" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE EXISTS { + MATCH (this)-[edge0:IN_GENRE]->(this0:Genre) + WHERE this0.id = $param0 +} +CALL { + WITH this + MATCH (this)-[inGenre0:IN_GENRE]->(genre0:Genre) + WITH genre0 { + .id + } AS genres + RETURN collect(genres) AS genres +} +RETURN this { + .id, + genres: genres +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies" : [ { + "id" : "RandomString1", + "genres" : [ { + "id" : "RandomString2" + } ] + } ] +} +---- + +==== should find using equality on relationship using connection + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + id: ID + genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "ActedIn") +} + +type Genre @node { + id: ID +} + +type ActedIn @relationshipProperties { + id: String +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (movie:Movie {id: "RandomString1"})-[:IN_GENRE {id:"RandomString3"}]->(:Genre {id:"RandomString2"}) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {genresConnection_SOME: {edge: {id_EQ: "RandomString3"}}}) { + id + genres { + id + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "RandomString3" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE EXISTS { + MATCH (this)-[edge0:IN_GENRE]->(this0:Genre) + WHERE edge0.id = $param0 +} +CALL { + WITH this + MATCH (this)-[inGenre0:IN_GENRE]->(genre0:Genre) + WITH genre0 { + .id + } AS genres + RETURN collect(genres) AS genres +} +RETURN this { + .id, + genres: genres +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies" : [ { + "id" : "RandomString1", + "genres" : [ { + "id" : "RandomString2" + } ] + } ] +} +---- + +==== should find relationship and node property equality using connection + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + id: ID + genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "ActedIn") +} + +type Genre @node { + id: ID +} + +type ActedIn @relationshipProperties { + id: String +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie {id: "RandomString1"})-[:IN_GENRE {id:"RandomString3"}]->(:Genre {id:"RandomString2"}) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies( + where: {genresConnection_SOME: {node: {id_EQ: "RandomString2"}, edge: {id_EQ: "RandomString3"}}} + ) { + id + genres { + id + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "RandomString2", + "param1" : "RandomString3" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE EXISTS { + MATCH (this)-[edge0:IN_GENRE]->(this0:Genre) + WHERE (this0.id = $param0 + AND edge0.id = $param1) +} +CALL { + WITH this + MATCH (this)-[inGenre0:IN_GENRE]->(genre0:Genre) + WITH genre0 { + .id + } AS genres + RETURN collect(genres) AS genres +} +RETURN this { + .id, + genres: genres +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies" : [ { + "id" : "RandomString1", + "genres" : [ { + "id" : "RandomString2" + } ] + } ] +} +---- + +=== NOT + +==== should find using NOT on relationship + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + id: ID + genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT) +} + +type Genre @node { + id: ID +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (root1:Movie {id: "RandomString1"}) + CREATE (root2:Movie {id: "RandomString2"}) + CREATE (relation1:Genre {id: "RandomString3"}) + CREATE (relation2:Genre {id: "RandomString4"}) + MERGE (root1)-[:IN_GENRE]->(relation1) + MERGE (root2)-[:IN_GENRE]->(relation2) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {NOT: {genres_SOME: {id_EQ: "RandomString4"}}}) { + id + genres { + id + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "RandomString4" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE NOT (EXISTS { + MATCH (this)-[:IN_GENRE]->(this0:Genre) + WHERE this0.id = $param0 +}) +CALL { + WITH this + MATCH (this)-[inGenre0:IN_GENRE]->(genre0:Genre) + WITH genre0 { + .id + } AS genres + RETURN collect(genres) AS genres +} +RETURN this { + .id, + genres: genres +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies" : [ { + "id" : "RandomString1", + "genres" : [ { + "id" : "RandomString3" + } ] + } ] +} +---- + +==== should find using relationship properties and connections + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + id: ID + genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "ActedIn") +} + +type Genre @node { + id: ID +} + +type ActedIn @relationshipProperties { + id: ID +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie {id: "RandomString1"})-[:IN_GENRE {id: "RandomString5"}]->(:Genre {id: "RandomString3"}) + CREATE (:Movie {id: "RandomString2"})-[:IN_GENRE {id: "A"}]->(:Genre {id: "RandomString4"}) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {genresConnection_NONE: {edge: {id_EQ: "RandomString5"}}}) { + id + genres { + id + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "RandomString5" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE NOT (EXISTS { + MATCH (this)-[edge0:IN_GENRE]->(this0:Genre) + WHERE edge0.id = $param0 +}) +CALL { + WITH this + MATCH (this)-[inGenre0:IN_GENRE]->(genre0:Genre) + WITH genre0 { + .id + } AS genres + RETURN collect(genres) AS genres +} +RETURN this { + .id, + genres: genres +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies" : [ { + "id" : "RandomString2", + "genres" : [ { + "id" : "RandomString4" + } ] + } ] +} +---- + +=== should test for not null + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + id: ID + genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT) +} + +type Genre @node { + id: ID +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (root:Movie {id: "RandomString1"}) + CREATE (:Movie {id: "RandomString3"}) + CREATE (relation:Genre {id: "RandomString2"}) + CREATE (:Genre {id: "RandomString3"}) + MERGE (root)-[:IN_GENRE]->(relation) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {genres_SOME: null}) { + id + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ } +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE NOT (EXISTS { + MATCH (this)-[:IN_GENRE]->(this0:Genre) +}) +RETURN this { + .id +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies" : [ { + "id" : "RandomString3" + } ] +} +---- diff --git a/core/src/test/resources/integration-test-files/filtering/advanced-filtering.js.adoc b/core/src/test/resources/integration-test-files/filtering/advanced-filtering.js.adoc index 26f5d8cb..74338e09 100644 --- a/core/src/test/resources/integration-test-files/filtering/advanced-filtering.js.adoc +++ b/core/src/test/resources/integration-test-files/filtering/advanced-filtering.js.adoc @@ -11,7 +11,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { property: ID } ---- @@ -40,11 +40,7 @@ CREATE (:Movie {property: "RandomString1"}) [source,json] ---- { - "param0": [ - "RandomString1", - "RandomString2", - "RandomString3" - ] + "param0" : [ "RandomString1", "RandomString2", "RandomString3" ] } ---- @@ -53,18 +49,18 @@ CREATE (:Movie {property: "RandomString1"}) ---- MATCH (this:Movie) WHERE this.property IN $param0 -RETURN this { .property } AS this +RETURN this { + .property +} AS this ---- .GraphQL-Response [source,json,response=true] ---- { - "movies": [ - { - "property": "RandomString1" - } - ] + "movies" : [ { + "property" : "RandomString1" + } ] } ---- @@ -128,6 +124,53 @@ RETURN this { .property } AS this } ---- +=== should find Movies NOT string + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie {property: "RandomString1"}) + CREATE (:Movie {property: "RandomString2"}) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {NOT: {property_EQ: "RandomString2"}}) { + property + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "RandomString2" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE NOT (this.property = $param0) +RETURN this { .property } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [ + { + "property": "RandomString1" + } + ] +} +---- + === should find Movies CONTAINS string .Test Data @@ -294,7 +337,7 @@ RETURN this { .property } AS this .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { property: String } ---- @@ -411,6 +454,53 @@ RETURN this { .property } AS this } ---- +=== should find Movies NOT string + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie {property: "RandomString1"}) + CREATE (:Movie {property: "RandomString2"}) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {NOT: {property_EQ: "RandomString2"}}) { + property + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "RandomString2" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE NOT (this.property = $param0) +RETURN this { .property } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [ + { + "property": "RandomString1" + } + ] +} +---- + === should find Movies CONTAINS string .Test Data @@ -577,11 +667,111 @@ RETURN this { .property } AS this .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String } ---- +=== should find Movies implicit EQ string + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie {title: "The Animatrix"}) + CREATE (:Movie {title: "The Matrix"}) + CREATE (:Movie {title: "The Matrix Reloaded"}) + CREATE (:Movie {title: "The Matrix Revolutions"}) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {title_EQ: "The Matrix"}) { + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "The Matrix" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.title = $param0 +RETURN this { .title } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [ + { + "title": "The Matrix" + } + ] +} +---- + +=== should find Movies EQ string + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie {title: "The Animatrix"}) + CREATE (:Movie {title: "The Matrix"}) + CREATE (:Movie {title: "The Matrix Reloaded"}) + CREATE (:Movie {title: "The Matrix Revolutions"}) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {title_EQ: "The Matrix"}) { + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "The Matrix" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.title = $param0 +RETURN this { .title } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [ + { + "title": "The Matrix" + } + ] +} +---- + +=== should find Movies GT string + .Configuration [source,json,schema-config=true] ---- @@ -599,8 +789,6 @@ type Movie { } ---- -=== should find Movies GT string - .Test Data [source,cypher,test-data=true] ---- @@ -653,6 +841,23 @@ RETURN this { .title } AS this === should find Movies LT string +.Configuration +[source,json,schema-config=true] +---- +{ + "features": { + "filters": { + "String": { + "LT": true, + "GT": true, + "LTE": true, + "GTE": true + } + } + } +} +---- + .Test Data [source,cypher,test-data=true] ---- @@ -708,6 +913,23 @@ RETURN this { .title } AS this === should find Movies GTE string +.Configuration +[source,json,schema-config=true] +---- +{ + "features": { + "filters": { + "String": { + "LT": true, + "GT": true, + "LTE": true, + "GTE": true + } + } + } +} +---- + .Test Data [source,cypher,test-data=true] ---- @@ -763,6 +985,23 @@ RETURN this { .title } AS this === should find Movies LTE string +.Configuration +[source,json,schema-config=true] +---- +{ + "features": { + "filters": { + "String": { + "LT": true, + "GT": true, + "LTE": true, + "GTE": true + } + } + } +} +---- + .Test Data [source,cypher,test-data=true] ---- @@ -826,24 +1065,25 @@ RETURN this { .title } AS this .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { property: Int } ---- -=== should find Movies IN numbers +=== should find Movies NOT number .Test Data [source,cypher,test-data=true] ---- CREATE (:Movie {property: 42}) + CREATE (:Movie {property: 84}) ---- .GraphQL-Query [source,graphql,request=true] ---- { - movies(where: {property_IN: [42, 84, 69]}) { + movies(where: {NOT: {property_EQ: 84}}) { property } } @@ -853,11 +1093,7 @@ CREATE (:Movie {property: 42}) [source,json] ---- { - "param0": [ - 42, - 84, - 69 - ] + "param0": 84 } ---- @@ -865,7 +1101,7 @@ CREATE (:Movie {property: 42}) [source,cypher] ---- MATCH (this:Movie) -WHERE this.property IN $param0 +WHERE NOT (this.property = $param0) RETURN this { .property } AS this ---- @@ -873,10 +1109,58 @@ RETURN this { .property } AS this [source,json,response=true] ---- { - "movies": [ - { - "property": 42 - } + "movies" : [ { + "property" : 42 + } ] +} +---- + +=== should find Movies IN numbers + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie {property: 42}) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {property_IN: [42, 84, 69]}) { + property + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": [ + 42, + 84, + 69 + ] +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.property IN $param0 +RETURN this { .property } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [ + { + "property": 42 + } ] } ---- @@ -1048,7 +1332,7 @@ CREATE (:Movie {property: 42}) [source,json] ---- { - "param0": 42 + "param0" : 42 } ---- @@ -1057,11 +1341,13 @@ CREATE (:Movie {property: 42}) ---- MATCH (this:Movie) WHERE this.property >= $param0 -RETURN this { .property } AS this +RETURN this { + .property +} AS this ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "movies": [ @@ -1082,11 +1368,58 @@ RETURN this { .property } AS this .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { property: Float } ---- +=== should find Movies NOT number + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie {property: 4.2}) + CREATE (:Movie {property: 8.4}) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {NOT: {property_EQ: 8.4}}) { + property + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": 8.4 +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE NOT (this.property = $param0) +RETURN this { .property } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [ + { + "property": 4.2 + } + ] +} +---- + === should find Movies IN numbers .Test Data @@ -1228,7 +1561,7 @@ RETURN this { .property } AS this "property": 4.2 }, { - "property": -1 + "property": -1.0 } ] } @@ -1338,7 +1671,7 @@ RETURN this { .property } AS this .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { property: Boolean } ---- @@ -1355,7 +1688,7 @@ CREATE (:Movie {property: false}) [source,graphql,request=true] ---- { - movies(where: {property: false}) { + movies(where: {property_EQ: false}) { property } } @@ -1388,3 +1721,685 @@ RETURN this { .property } AS this ] } ---- + +=== should find Movies NOT boolean + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {NOT: {property_EQ: false}}) { + property + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": false +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE NOT (this.property = $param0) +RETURN this { .property } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [] +} +---- + +== Relationship/Connection Filtering + +=== equality + +==== should find using relationship equality on node + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + id: ID + genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT) +} + +type Genre @node { + id: ID +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (root:Movie {id: "RandomString1"}) + CREATE (:Movie {id: "RandomString3"}) + CREATE (relation:Genre {id: "RandomString2"}) + CREATE (:Genre {id: "RandomString3"}) + MERGE (root)-[:IN_GENRE]->(relation) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {genres_SOME: {id_EQ: "RandomString2"}}) { + id + genres { + id + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "RandomString2" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE EXISTS { + MATCH (this)-[:IN_GENRE]->(this0:Genre) + WHERE this0.id = $param0 +} +CALL { + WITH this + MATCH (this)-[this1:IN_GENRE]->(this2:Genre) + WITH this2 { .id } AS this2 + RETURN collect(this2) AS var3 +} +RETURN this { .id, genres: var3 } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [ + { + "id": "RandomString1", + "genres": [ + { + "id": "RandomString2" + } + ] + } + ] +} +---- + +==== should find using equality on node using connection + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + id: ID + genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT) +} + +type Genre @node { + id: ID +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie {id: "RandomString1"})-[:IN_GENRE]->(:Genre {id:"RandomString2"}) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {genresConnection_SOME: {node: {id_EQ: "RandomString2"}}}) { + id + genres { + id + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "RandomString2" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE EXISTS { + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) + WHERE this1.id = $param0 +} +CALL { + WITH this + MATCH (this)-[this2:IN_GENRE]->(this3:Genre) + WITH this3 { .id } AS this3 + RETURN collect(this3) AS var4 +} +RETURN this { .id, genres: var4 } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [ + { + "id": "RandomString1", + "genres": [ + { + "id": "RandomString2" + } + ] + } + ] +} +---- + +==== should find using equality on relationship using connection + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + id: ID + genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "ActedIn") +} + +type Genre @node { + id: ID +} + +type ActedIn @relationshipProperties { + id: String +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (movie:Movie {id: "RandomString1"})-[:IN_GENRE {id:"RandomString3"}]->(:Genre {id:"RandomString2"}) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {genresConnection_SOME: {edge: {id_EQ: "RandomString3"}}}) { + id + genres { + id + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "RandomString3" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE EXISTS { + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) + WHERE this0.id = $param0 +} +CALL { + WITH this + MATCH (this)-[this2:IN_GENRE]->(this3:Genre) + WITH this3 { .id } AS this3 + RETURN collect(this3) AS var4 +} +RETURN this { .id, genres: var4 } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [ + { + "id": "RandomString1", + "genres": [ + { + "id": "RandomString2" + } + ] + } + ] +} +---- + +==== should find relationship and node property equality using connection + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + id: ID + genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "ActedIn") +} + +type Genre @node { + id: ID +} + +type ActedIn @relationshipProperties { + id: String +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie {id: "RandomString1"})-[:IN_GENRE {id:"RandomString3"}]->(:Genre {id:"RandomString2"}) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies( + where: {genresConnection_SOME: {node: {id_EQ: "RandomString2"}, edge: {id_EQ: "RandomString3"}}} + ) { + id + genres { + id + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "RandomString2", + "param1": "RandomString3" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE EXISTS { + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) + WHERE (this1.id = $param0 AND this0.id = $param1) +} +CALL { + WITH this + MATCH (this)-[this2:IN_GENRE]->(this3:Genre) + WITH this3 { .id } AS this3 + RETURN collect(this3) AS var4 +} +RETURN this { .id, genres: var4 } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [ + { + "id": "RandomString1", + "genres": [ + { + "id": "RandomString2" + } + ] + } + ] +} +---- + +=== NOT + +==== should find using NOT on relationship + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + id: ID + genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT) +} + +type Genre @node { + id: ID +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (root1:Movie {id: "RandomString1"}) + CREATE (root2:Movie {id: "RandomString2"}) + CREATE (relation1:Genre {id: "RandomString3"}) + CREATE (relation2:Genre {id: "RandomString4"}) + MERGE (root1)-[:IN_GENRE]->(relation1) + MERGE (root2)-[:IN_GENRE]->(relation2) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {NOT: {genres_SOME: {id_EQ: "RandomString4"}}}) { + id + genres { + id + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "RandomString4" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE NOT (EXISTS { + MATCH (this)-[:IN_GENRE]->(this0:Genre) + WHERE this0.id = $param0 +}) +CALL { + WITH this + MATCH (this)-[this1:IN_GENRE]->(this2:Genre) + WITH this2 { .id } AS this2 + RETURN collect(this2) AS var3 +} +RETURN this { .id, genres: var3 } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [ + { + "id": "RandomString1", + "genres": [ + { + "id": "RandomString3" + } + ] + } + ] +} +---- + +==== should find using relationship properties and connections + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + id: ID + genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "ActedIn") +} + +type Genre @node { + id: ID +} + +type ActedIn @relationshipProperties { + id: ID +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie {id: "RandomString1"})-[:IN_GENRE {id: "RandomString5"}]->(:Genre {id: "RandomString3"}) + CREATE (:Movie {id: "RandomString2"})-[:IN_GENRE {id: "A"}]->(:Genre {id: "RandomString4"}) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {genresConnection_NONE: {edge: {id_EQ: "RandomString5"}}}) { + id + genres { + id + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "RandomString5" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE NOT (EXISTS { + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) + WHERE this0.id = $param0 +}) +CALL { + WITH this + MATCH (this)-[this2:IN_GENRE]->(this3:Genre) + WITH this3 { .id } AS this3 + RETURN collect(this3) AS var4 +} +RETURN this { .id, genres: var4 } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [ + { + "id": "RandomString2", + "genres": [ + { + "id": "RandomString4" + } + ] + } + ] +} +---- + +=== should test for not null + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + id: ID + genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT) +} + +type Genre @node { + id: ID +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (root:Movie {id: "RandomString1"}) + CREATE (:Movie {id: "RandomString3"}) + CREATE (relation:Genre {id: "RandomString2"}) + CREATE (:Genre {id: "RandomString3"}) + MERGE (root)-[:IN_GENRE]->(relation) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {genres_SOME: null}) { + id + } +} +---- + +.Expected Cypher params +[source,json] +---- +{} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE NOT (EXISTS { + MATCH (this)-[:IN_GENRE]->(this0:Genre) +}) +RETURN this { .id } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [ + { + "id": "RandomString3" + } + ] +} +---- + +== NULL Filtering + +=== Setup + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + id: String! + optional: String +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie {id: "RandomString1"}) + CREATE (:Movie {id: "RandomString2", optional: "RandomString3"}) +---- + +=== should work for non-existence + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {optional_EQ: null}) { + id + } +} +---- + +.Expected Cypher params +[source,json] +---- +{} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.optional IS NULL +RETURN this { .id } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [ + { + "id": "RandomString1" + } + ] +} +---- + +=== should work for existence + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {NOT: {optional_EQ: null}}) { + id + } +} +---- + +.Expected Cypher params +[source,json] +---- +{} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE NOT (this.optional IS NULL) +RETURN this { .id } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [ + { + "id": "RandomString2" + } + ] +} +---- diff --git a/core/src/test/resources/integration-test-files/filtering/filter-interface-relationship.adoc b/core/src/test/resources/integration-test-files/filtering/filter-interface-relationship.adoc index 9a383de1..9828e3d5 100644 --- a/core/src/test/resources/integration-test-files/filtering/filter-interface-relationship.adoc +++ b/core/src/test/resources/integration-test-files/filtering/filter-interface-relationship.adoc @@ -12,12 +12,12 @@ interface Production { title: String! } -type Movie implements Production { +type Movie implements Production @node { title: String! runtime: Int! } -type Series implements Production { +type Series implements Production @node { title: String! episodes: Int! } @@ -26,7 +26,7 @@ type ActedIn @relationshipProperties { screenTime: Int! } -type Actor { +type Actor @node { name: String! currentlyActingIn: Production @relationship(type: "CURRENTLY_ACTING_IN", direction: OUT) actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") @@ -49,7 +49,7 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($title: String) { - actors(where: {actedIn_SOME: {title: $title}}) { + actors(where: {actedIn_SOME: {title_EQ: $title}}) { name actedIn { title @@ -156,7 +156,7 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($title: String) { - actors(where: {actedIn_ALL: {title: $title}}) { + actors(where: {actedIn_ALL: {title_EQ: $title}}) { name actedIn { title @@ -273,7 +273,7 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($title: String) { - actors(where: {actedIn_ALL: {title: $title}}) { + actors(where: {actedIn_ALL: {title_EQ: $title}}) { name actedIn { title @@ -382,7 +382,7 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($title: String) { - actors(where: {actedIn_SINGLE: {title: $title}}) { + actors(where: {actedIn_SINGLE: {title_EQ: $title}}) { name actedIn { title @@ -490,7 +490,7 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($title: String) { - actors(where: {actedIn_NONE: {title: $title}}) { + actors(where: {actedIn_NONE: {title_EQ: $title}}) { name actedIn { title diff --git a/core/src/test/resources/integration-test-files/filtering/filter-interface-relationship.js.adoc b/core/src/test/resources/integration-test-files/filtering/filter-interface-relationship.js.adoc index ca051c95..b0db2222 100644 --- a/core/src/test/resources/integration-test-files/filtering/filter-interface-relationship.js.adoc +++ b/core/src/test/resources/integration-test-files/filtering/filter-interface-relationship.js.adoc @@ -13,12 +13,12 @@ interface Production { title: String! } -type Movie implements Production { +type Movie implements Production @node { title: String! runtime: Int! } -type Series implements Production { +type Series implements Production @node { title: String! episodes: Int! } @@ -27,7 +27,7 @@ type ActedIn @relationshipProperties { screenTime: Int! } -type Actor { +type Actor @node { name: String! currentlyActingIn: Production @relationship(type: "CURRENTLY_ACTING_IN", direction: OUT) actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") @@ -50,7 +50,7 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($title: String) { - actors(where: {actedIn_SOME: {title: $title}}) { + actors(where: {actedIn_SOME: {title_EQ: $title}}) { name actedIn { title @@ -148,7 +148,7 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($title: String) { - actors(where: {actedIn_ALL: {title: $title}}) { + actors(where: {actedIn_ALL: {title_EQ: $title}}) { name actedIn { title @@ -255,7 +255,7 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($title: String) { - actors(where: {actedIn_ALL: {title: $title}}) { + actors(where: {actedIn_ALL: {title_EQ: $title}}) { name actedIn { title @@ -349,7 +349,7 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($title: String) { - actors(where: {actedIn_SINGLE: {title: $title}}) { + actors(where: {actedIn_SINGLE: {title_EQ: $title}}) { name actedIn { title @@ -445,7 +445,7 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($title: String) { - actors(where: {actedIn_NONE: {title: $title}}) { + actors(where: {actedIn_NONE: {title_EQ: $title}}) { name actedIn { title diff --git a/core/src/test/resources/integration-test-files/filtering/filter-union-relationship.adoc b/core/src/test/resources/integration-test-files/filtering/filter-union-relationship.adoc index 28c5f8a3..867fe5d9 100644 --- a/core/src/test/resources/integration-test-files/filtering/filter-union-relationship.adoc +++ b/core/src/test/resources/integration-test-files/filtering/filter-union-relationship.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! runtime: Int! } -type Series { +type Series @node { title: String! episodes: Int! } @@ -24,7 +24,7 @@ type ActedIn @relationshipProperties { screenTime: Int! } -type Actor { +type Actor @node { name: String! currentlyActingIn: Production @relationship(type: "CURRENTLY_ACTING_IN", direction: OUT) actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") @@ -47,7 +47,7 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($title: String) { - actors(where: {actedIn_SOME: {Movie: {title: $title}}}) { + actors(where: {actedIn_SOME: {Movie: {title_EQ: $title}}}) { name actedIn { ... on Movie { @@ -149,7 +149,7 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($title: String) { - actors(where: {actedIn_ALL: {Movie: {title: $title}}}) { + actors(where: {actedIn_ALL: {Movie: {title_EQ: $title}}}) { name actedIn { ... on Movie { @@ -265,7 +265,9 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($title: String) { - actors(where: {actedIn_ALL: {Movie: {title: $title}, Series: {title: $title}}}) { + actors( + where: {actedIn_ALL: {Movie: {title_EQ: $title}, Series: {title_EQ: $title}}} + ) { name actedIn { ... on Movie { @@ -383,7 +385,9 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($title: String) { - actors(where: {actedIn_ALL: {Movie: {title: $title}, Series: {title: $title}}}) { + actors( + where: {actedIn_ALL: {Movie: {title_EQ: $title}, Series: {title_EQ: $title}}} + ) { name actedIn { ... on Movie { @@ -493,7 +497,7 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($title: String) { - actors(where: {actedIn_SINGLE: {Movie: {title: $title}}}) { + actors(where: {actedIn_SINGLE: {Movie: {title_EQ: $title}}}) { name actedIn { ... on Movie { @@ -598,7 +602,9 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($title: String) { - actors(where: {actedIn_NONE: {Movie: {title: $title}, Series: {title: $title}}}) { + actors( + where: {actedIn_NONE: {Movie: {title_EQ: $title}, Series: {title_EQ: $title}}} + ) { name actedIn { ... on Movie { diff --git a/core/src/test/resources/integration-test-files/filtering/filter-union-relationship.js.adoc b/core/src/test/resources/integration-test-files/filtering/filter-union-relationship.js.adoc index c51851fc..d38dbb40 100644 --- a/core/src/test/resources/integration-test-files/filtering/filter-union-relationship.js.adoc +++ b/core/src/test/resources/integration-test-files/filtering/filter-union-relationship.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! runtime: Int! } -type Series { +type Series @node { title: String! episodes: Int! } @@ -25,7 +25,7 @@ type ActedIn @relationshipProperties { screenTime: Int! } -type Actor { +type Actor @node { name: String! currentlyActingIn: Production @relationship(type: "CURRENTLY_ACTING_IN", direction: OUT) actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") @@ -48,7 +48,7 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($title: String) { - actors(where: {actedIn_SOME: {Movie: {title: $title}}}) { + actors(where: {actedIn_SOME: {Movie: {title_EQ: $title}}}) { name actedIn { ... on Movie { @@ -142,7 +142,7 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($title: String) { - actors(where: {actedIn_ALL: {Movie: {title: $title}}}) { + actors(where: {actedIn_ALL: {Movie: {title_EQ: $title}}}) { name actedIn { ... on Movie { @@ -253,7 +253,9 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($title: String) { - actors(where: {actedIn_ALL: {Movie: {title: $title}, Series: {title: $title}}}) { + actors( + where: {actedIn_ALL: {Movie: {title_EQ: $title}, Series: {title_EQ: $title}}} + ) { name actedIn { ... on Movie { @@ -361,7 +363,9 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($title: String) { - actors(where: {actedIn_ALL: {Movie: {title: $title}, Series: {title: $title}}}) { + actors( + where: {actedIn_ALL: {Movie: {title_EQ: $title}, Series: {title_EQ: $title}}} + ) { name actedIn { ... on Movie { @@ -456,7 +460,7 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($title: String) { - actors(where: {actedIn_SINGLE: {Movie: {title: $title}}}) { + actors(where: {actedIn_SINGLE: {Movie: {title_EQ: $title}}}) { name actedIn { ... on Movie { @@ -521,11 +525,11 @@ RETURN this { .name, actedIn: var3 } AS this "name": "RandomString2", "actedIn": [ { - "title": "RandomString3", + "title": "RandomString4", "runtime": 55815 }, { - "title": "RandomString4", + "title": "RandomString3", "runtime": 55815 } ] @@ -552,7 +556,9 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($title: String) { - actors(where: {actedIn_NONE: {Movie: {title: $title}, Series: {title: $title}}}) { + actors( + where: {actedIn_NONE: {Movie: {title_EQ: $title}, Series: {title_EQ: $title}}} + ) { name actedIn { ... on Movie { diff --git a/core/src/test/resources/integration-test-files/filtering/operations.adoc b/core/src/test/resources/integration-test-files/filtering/operations.adoc index 135c77a7..80fde720 100644 --- a/core/src/test/resources/integration-test-files/filtering/operations.adoc +++ b/core/src/test/resources/integration-test-files/filtering/operations.adoc @@ -8,13 +8,13 @@ .Schema [source,graphql,schema=true] ---- -type Person { +type Person @node { name: String! age: Int! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: IN) } -type Movie { +type Movie @node { title: String! released: Int! actors: [Person!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -37,7 +37,7 @@ CREATE (:Movie {title: "The Matrix", released: 1999}) ---- { movies( - where: {OR: [{title: "The Italian Job", released: 2003}, {title: "The Lion King"}]} + where: {OR: [{title_EQ: "The Italian Job", released_EQ: 2003}, {title_EQ: "The Lion King"}]} ) { title released diff --git a/core/src/test/resources/integration-test-files/filtering/operations.js.adoc b/core/src/test/resources/integration-test-files/filtering/operations.js.adoc index 6183bf7b..61f0a656 100644 --- a/core/src/test/resources/integration-test-files/filtering/operations.js.adoc +++ b/core/src/test/resources/integration-test-files/filtering/operations.js.adoc @@ -9,13 +9,13 @@ .Schema [source,graphql,schema=true] ---- -type Person { +type Person @node { name: String! age: Int! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: IN) } -type Movie { +type Movie @node { title: String! released: Int! actors: [Person!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -38,7 +38,7 @@ CREATE (:Movie {title: "The Matrix", released: 1999}) ---- { movies( - where: {OR: [{title: "The Italian Job", released: 2003}, {title: "The Lion King"}]} + where: {OR: [{title_EQ: "The Italian Job", released_EQ: 2003}, {title_EQ: "The Lion King"}]} ) { title released diff --git a/core/src/test/resources/integration-test-files/filtering/single-relationship.adoc b/core/src/test/resources/integration-test-files/filtering/single-relationship.adoc index 18adb1b5..b034d280 100644 --- a/core/src/test/resources/integration-test-files/filtering/single-relationship.adoc +++ b/core/src/test/resources/integration-test-files/filtering/single-relationship.adoc @@ -8,14 +8,14 @@ .Schema [source,graphql,schema=true] ---- -type Person { +type Person @node { name: String! actedIn: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) directedMovies: [Movie!]! @relationship(type: "DIRECTED", direction: OUT) producedMovies: [Movie!]! @relationship(type: "PRODUCED", direction: OUT) } -type Movie { +type Movie @node { title: String! actors: [Person!]! @relationship(type: "ACTED_IN", direction: OUT) director: Person! @relationship(type: "DIRECTED", direction: IN) @@ -49,7 +49,7 @@ CREATE(jw:Person {name: "Jon Wu"}) ---- { movies( - where: {OR: [{director: {name: "Jon Wu"}}, {producer: {name: "Jon Wu"}}]} + where: {OR: [{director: {name_EQ: "Jon Wu"}}, {producer: {name_EQ: "Jon Wu"}}]} ) { title } @@ -94,6 +94,83 @@ RETURN this { } ---- +== Filter on required and optional relationships in nested queries + +.Test Data +[source,cypher,test-data=true] +---- +CREATE(a:Person {name: "That actor that you are not so sure what the name is but have seen before"}) + CREATE(a2:Person {name: "not so famous one"}) + CREATE(a3:Person {name: "don't know this one"}) + + + + CREATE(jw:Person {name: "Jon Wu"}) + CREATE(ht:Movie {title: "Hard Target"})<-[:DIRECTED]-(jw) + CREATE(cb:Movie {title: "Chi bi"})<-[:DIRECTED]-(jw) + CREATE(cb)<-[:PRODUCED]-(jw) + CREATE(m:Movie {title: "Avatar"})<-[:DIRECTED]-(:Person {name: "Richie McFamous"}) + + CREATE(a)-[:ACTED_IN]->(ht) + CREATE(a)-[:ACTED_IN]->(cb) + CREATE(a2)-[:ACTED_IN]->(cb) + CREATE(a)-[:ACTED_IN]->(m) + CREATE(a3)-[:ACTED_IN]->(m) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + people( + where: {actedIn_SOME: {OR: [{director: {name_EQ: "Jon Wu"}}, {producer: {name_EQ: "Jon Wu"}}]}} + ) { + name + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Jon Wu", + "param1" : "Jon Wu" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Person) +WHERE EXISTS { + MATCH (this)-[:ACTED_IN]->(this0:Movie) + WHERE (EXISTS { + MATCH (this00:Person)-[:DIRECTED]->(this0) + WHERE this00.name = $param0 + } + OR EXISTS { + MATCH (this01:Person)-[:PRODUCED]->(this0) + WHERE this01.name = $param1 + }) +} +RETURN this { + .name +} AS this +---- + +.GraphQL-Response +[source,json,response=true,ignore-order] +---- +{ + "people" : [ { + "name" : "That actor that you are not so sure what the name is but have seen before" + }, { + "name" : "not so famous one" + } ] +} +---- + == Filter on optional relationships without results .Test Data @@ -110,7 +187,7 @@ CREATE(jw:Person {name: "Jon Wu"}) [source,graphql,request=true] ---- { - movies(where: {producer: {name: "Uw Noj"}}) { + movies(where: {producer: {name_EQ: "Uw Noj"}}) { title } } diff --git a/core/src/test/resources/integration-test-files/filtering/single-relationship.js.adoc b/core/src/test/resources/integration-test-files/filtering/single-relationship.js.adoc index 07fb679d..4b00d7cc 100644 --- a/core/src/test/resources/integration-test-files/filtering/single-relationship.js.adoc +++ b/core/src/test/resources/integration-test-files/filtering/single-relationship.js.adoc @@ -9,14 +9,14 @@ .Schema [source,graphql,schema=true] ---- -type Person { +type Person @node { name: String! actedIn: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) directedMovies: [Movie!]! @relationship(type: "DIRECTED", direction: OUT) producedMovies: [Movie!]! @relationship(type: "PRODUCED", direction: OUT) } -type Movie { +type Movie @node { title: String! actors: [Person!]! @relationship(type: "ACTED_IN", direction: OUT) director: Person! @relationship(type: "DIRECTED", direction: IN) @@ -50,7 +50,7 @@ CREATE(jw:Person {name: "Jon Wu"}) ---- { movies( - where: {OR: [{director: {name: "Jon Wu"}}, {producer: {name: "Jon Wu"}}]} + where: {OR: [{director: {name_EQ: "Jon Wu"}}, {producer: {name_EQ: "Jon Wu"}}]} ) { title } @@ -71,9 +71,9 @@ CREATE(jw:Person {name: "Jon Wu"}) ---- MATCH (this:Movie) OPTIONAL MATCH (this)<-[:DIRECTED]-(this0:Person) -WITH *, count(this0) AS directorCount +WITH *, count(this0) AS var1 WITH * -WHERE ((directorCount <> 0 AND this0.name = $param0) OR single(this1 IN [(this)<-[:PRODUCED]-(this1:Person) WHERE this1.name = $param1 | 1] WHERE true)) +WHERE ((var1 <> 0 AND this0.name = $param0) OR single(this2 IN [(this)<-[:PRODUCED]-(this2:Person) WHERE this2.name = $param1 | 1] WHERE true)) RETURN this { .title } AS this ---- @@ -82,11 +82,89 @@ RETURN this { .title } AS this ---- { "movies": [ + { + "title": "Chi bi" + }, { "title": "Hard Target" + } + ] +} +---- + +== Filter on required and optional relationships in nested queries + +.Test Data +[source,cypher,test-data=true] +---- +CREATE(a:Person {name: "That actor that you are not so sure what the name is but have seen before"}) + CREATE(a2:Person {name: "not so famous one"}) + CREATE(a3:Person {name: "don't know this one"}) + + + + CREATE(jw:Person {name: "Jon Wu"}) + CREATE(ht:Movie {title: "Hard Target"})<-[:DIRECTED]-(jw) + CREATE(cb:Movie {title: "Chi bi"})<-[:DIRECTED]-(jw) + CREATE(cb)<-[:PRODUCED]-(jw) + CREATE(m:Movie {title: "Avatar"})<-[:DIRECTED]-(:Person {name: "Richie McFamous"}) + + CREATE(a)-[:ACTED_IN]->(ht) + CREATE(a)-[:ACTED_IN]->(cb) + CREATE(a2)-[:ACTED_IN]->(cb) + CREATE(a)-[:ACTED_IN]->(m) + CREATE(a3)-[:ACTED_IN]->(m) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + people( + where: {actedIn_SOME: {OR: [{director: {name_EQ: "Jon Wu"}}, {producer: {name_EQ: "Jon Wu"}}]}} + ) { + name + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Jon Wu", + "param1": "Jon Wu" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Person) +CALL { + WITH this + MATCH (this)-[:ACTED_IN]->(this0:Movie) + OPTIONAL MATCH (this0)<-[:DIRECTED]-(this1:Person) + WITH *, count(this1) AS var2 + WITH * + WHERE ((var2 <> 0 AND this1.name = $param0) OR single(this3 IN [(this0)<-[:PRODUCED]-(this3:Person) WHERE this3.name = $param1 | 1] WHERE true)) + RETURN count(this0) > 0 AS var4 +} +WITH * +WHERE var4 = true +RETURN this { .name } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "people": [ + { + "name": "That actor that you are not so sure what the name is but have seen before" }, { - "title": "Chi bi" + "name": "not so famous one" } ] } @@ -108,7 +186,7 @@ CREATE(jw:Person {name: "Jon Wu"}) [source,graphql,request=true] ---- { - movies(where: {producer: {name: "Uw Noj"}}) { + movies(where: {producer: {name_EQ: "Uw Noj"}}) { title } } diff --git a/core/src/test/resources/integration-test-files/filtering/typename-in.adoc b/core/src/test/resources/integration-test-files/filtering/typename-in.adoc index ad281527..1a5f3832 100644 --- a/core/src/test/resources/integration-test-files/filtering/typename-in.adoc +++ b/core/src/test/resources/integration-test-files/filtering/typename-in.adoc @@ -13,19 +13,19 @@ interface Production { cost: Float! } -type Movie implements Production { +type Movie implements Production @node { title: String! cost: Float! runtime: Int! } -type Series implements Production { +type Series implements Production @node { title: String! cost: Float! episodes: Int! } -type Cartoon implements Production { +type Cartoon implements Production @node { title: String! cost: Float! cartoonist: String! @@ -35,7 +35,7 @@ type ActedIn @relationshipProperties { screenTime: Int! } -type Actor { +type Actor @node { name: String! actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } @@ -57,7 +57,7 @@ CREATE(a:Actor { name: "Keanu" }) ---- { productions( - where: {OR: [{AND: [{title: "The Matrix"}, {typename_IN: [Movie]}]}, {typename_IN: [Series]}]} + where: {OR: [{AND: [{title_EQ: "The Matrix"}, {typename: [Movie]}]}, {typename: [Series]}]} ) { __typename title @@ -136,7 +136,7 @@ RETURN this AS this { actors { actedIn( - where: {OR: [{AND: [{title: "The Matrix"}, {typename_IN: [Movie]}]}, {typename_IN: [Series]}]} + where: {OR: [{AND: [{title_EQ: "The Matrix"}, {typename: [Movie]}]}, {typename: [Series]}]} ) { __typename title diff --git a/core/src/test/resources/integration-test-files/filtering/typename-in.js.adoc b/core/src/test/resources/integration-test-files/filtering/typename-in.js.adoc index c9a795cd..2e3da04c 100644 --- a/core/src/test/resources/integration-test-files/filtering/typename-in.js.adoc +++ b/core/src/test/resources/integration-test-files/filtering/typename-in.js.adoc @@ -14,19 +14,19 @@ interface Production { cost: Float! } -type Movie implements Production { +type Movie implements Production @node { title: String! cost: Float! runtime: Int! } -type Series implements Production { +type Series implements Production @node { title: String! cost: Float! episodes: Int! } -type Cartoon implements Production { +type Cartoon implements Production @node { title: String! cost: Float! cartoonist: String! @@ -36,7 +36,7 @@ type ActedIn @relationshipProperties { screenTime: Int! } -type Actor { +type Actor @node { name: String! actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } @@ -58,7 +58,7 @@ CREATE(a:Actor { name: "Keanu" }) ---- { productions( - where: {OR: [{AND: [{title: "The Matrix"}, {typename_IN: [Movie]}]}, {typename_IN: [Series]}]} + where: {OR: [{AND: [{title_EQ: "The Matrix"}, {typename: [Movie]}]}, {typename: [Series]}]} ) { __typename title @@ -124,7 +124,7 @@ RETURN this AS this { actors { actedIn( - where: {OR: [{AND: [{title: "The Matrix"}, {typename_IN: [Movie]}]}, {typename_IN: [Series]}]} + where: {OR: [{AND: [{title_EQ: "The Matrix"}, {typename: [Movie]}]}, {typename: [Series]}]} ) { __typename title diff --git a/core/src/test/resources/integration-test-files/find.adoc b/core/src/test/resources/integration-test-files/find.adoc index 86e3493c..b949c49e 100644 --- a/core/src/test/resources/integration-test-files/find.adoc +++ b/core/src/test/resources/integration-test-files/find.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String movies: [Movie!]! @relationship(type: "ACTED_IN", direction: IN) } -type Movie { +type Movie @node { id: ID! title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -30,7 +30,7 @@ CREATE (:Movie {id: "RandomString1"}), (:Movie {id: "RandomString1"}), (:Movie { [source,graphql,request=true] ---- query ($id: ID) { - movies(where: {id: $id}) { + movies(where: {id_EQ: $id}) { id } } @@ -81,12 +81,12 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String movies: [Movie!]! @relationship(type: "ACTED_IN", direction: IN) } -type Movie { +type Movie @node { id: ID! title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -103,7 +103,7 @@ CREATE (:Movie {id: "RandomString1"}), (:Movie {id: "RandomString1"}), (:Movie { [source,graphql,request=true] ---- query ($id: ID) { - movies(where: {id: $id}, options: {limit: 2}) { + movies(where: {id_EQ: $id}, limit: 2) { id } } @@ -154,12 +154,12 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String movies: [Movie!]! @relationship(type: "ACTED_IN", direction: IN) } -type Movie { +type Movie @node { id: ID! title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -227,12 +227,12 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String movies: [Movie!]! @relationship(type: "ACTED_IN", direction: IN) } -type Movie { +type Movie @node { id: ID! title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -249,7 +249,7 @@ CREATE (:User {id: "RandomString1", title: "RandomString4"}), (:User {id: "Rando [source,graphql,request=true] ---- query ($ids: [ID!], $title: String) { - movies(where: {id_IN: $ids, title: $title}) { + movies(where: {id_IN: $ids, title_EQ: $title}) { id title } @@ -299,12 +299,12 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { id: ID! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: IN) } -type Movie { +type Movie @node { id: ID! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -439,12 +439,12 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String movies: [Movie!]! @relationship(type: "ACTED_IN", direction: IN) } -type Movie { +type Movie @node { id: ID! title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -475,8 +475,8 @@ query ($movieWhere: MovieWhere) { { "movieWhere" : { "OR" : [ { - "title" : "RandomString2", - "id" : "RandomString1" + "title_EQ" : "RandomString2", + "id_EQ" : "RandomString1" } ] } } diff --git a/core/src/test/resources/integration-test-files/find.js.adoc b/core/src/test/resources/integration-test-files/find.js.adoc index ddf469dc..a3c3a392 100644 --- a/core/src/test/resources/integration-test-files/find.js.adoc +++ b/core/src/test/resources/integration-test-files/find.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String movies: [Movie!]! @relationship(type: "ACTED_IN", direction: IN) } -type Movie { +type Movie @node { id: ID! title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -31,7 +31,7 @@ CREATE (:Movie {id: "RandomString1"}), (:Movie {id: "RandomString1"}), (:Movie { [source,graphql,request=true] ---- query ($id: ID) { - movies(where: {id: $id}) { + movies(where: {id_EQ: $id}) { id } } @@ -84,12 +84,12 @@ RETURN this { .id } AS this .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String movies: [Movie!]! @relationship(type: "ACTED_IN", direction: IN) } -type Movie { +type Movie @node { id: ID! title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -106,7 +106,7 @@ CREATE (:Movie {id: "RandomString1"}), (:Movie {id: "RandomString1"}), (:Movie { [source,graphql,request=true] ---- query ($id: ID) { - movies(where: {id: $id}, options: {limit: 2}) { + movies(where: {id_EQ: $id}, limit: 2) { id } } @@ -160,12 +160,12 @@ RETURN this { .id } AS this .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String movies: [Movie!]! @relationship(type: "ACTED_IN", direction: IN) } -type Movie { +type Movie @node { id: ID! title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -226,13 +226,13 @@ RETURN this { .id } AS this { "movies": [ { - "id": "RandomString1" + "id": "RandomString3" }, { - "id": "RandomString2" + "id": "RandomString1" }, { - "id": "RandomString3" + "id": "RandomString2" } ] } @@ -243,12 +243,12 @@ RETURN this { .id } AS this .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String movies: [Movie!]! @relationship(type: "ACTED_IN", direction: IN) } -type Movie { +type Movie @node { id: ID! title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -265,7 +265,7 @@ CREATE (:User {id: "RandomString1", title: "RandomString4"}), (:User {id: "Rando [source,graphql,request=true] ---- query ($ids: [ID!], $title: String) { - movies(where: {id_IN: $ids, title: $title}) { + movies(where: {id_IN: $ids, title_EQ: $title}) { id title } @@ -319,12 +319,12 @@ RETURN this { .id, .title } AS this .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { id: ID! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: IN) } -type Movie { +type Movie @node { id: ID! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -424,16 +424,16 @@ RETURN this { .id, actors: var8 } AS this { "movies": [ { - "id": "RandomString3", + "id": "RandomString2", "actors": [ { - "id": "RandomString6", + "id": "RandomString5", "movies": [ { - "id": "RandomString3", + "id": "RandomString2", "actors": [ { - "id": "RandomString6" + "id": "RandomString5" } ] } @@ -442,16 +442,16 @@ RETURN this { .id, actors: var8 } AS this ] }, { - "id": "RandomString1", + "id": "RandomString3", "actors": [ { - "id": "RandomString4", + "id": "RandomString6", "movies": [ { - "id": "RandomString1", + "id": "RandomString3", "actors": [ { - "id": "RandomString4" + "id": "RandomString6" } ] } @@ -460,16 +460,16 @@ RETURN this { .id, actors: var8 } AS this ] }, { - "id": "RandomString2", + "id": "RandomString1", "actors": [ { - "id": "RandomString5", + "id": "RandomString4", "movies": [ { - "id": "RandomString2", + "id": "RandomString1", "actors": [ { - "id": "RandomString5" + "id": "RandomString4" } ] } @@ -486,12 +486,12 @@ RETURN this { .id, actors: var8 } AS this .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String movies: [Movie!]! @relationship(type: "ACTED_IN", direction: IN) } -type Movie { +type Movie @node { id: ID! title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -523,8 +523,8 @@ query ($movieWhere: MovieWhere) { "movieWhere": { "OR": [ { - "title": "RandomString2", - "id": "RandomString1" + "title_EQ": "RandomString2", + "id_EQ": "RandomString1" } ] } diff --git a/core/src/test/resources/integration-test-files/interfaces/relationships/read.adoc b/core/src/test/resources/integration-test-files/interfaces/relationships/read.adoc index c94773b4..0d17950a 100644 --- a/core/src/test/resources/integration-test-files/interfaces/relationships/read.adoc +++ b/core/src/test/resources/integration-test-files/interfaces/relationships/read.adoc @@ -12,12 +12,12 @@ interface Production { title: String! } -type Movie implements Production { +type Movie implements Production @node { title: String! runtime: Int! } -type Series implements Production { +type Series implements Production @node { title: String! episodes: Int! } @@ -26,7 +26,7 @@ type ActedIn @relationshipProperties { screenTime: Int! } -type Actor { +type Actor @node { name: String! currentlyActingIn: Production @relationship(type: "CURRENTLY_ACTING_IN", direction: OUT) actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") @@ -47,7 +47,7 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($name: String) { - actors(where: {name: $name}) { + actors(where: {name_EQ: $name}) { name actedIn { title @@ -145,9 +145,9 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($name: String) { - actors(where: {name: $name}) { + actors(where: {name_EQ: $name}) { name - actedIn(options: {sort: [{title: DESC}]}) { + actedIn(sort: [{title: DESC}]) { title ... on Movie { runtime @@ -250,7 +250,7 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($name: String) { - actors(where: {name: $name}) { + actors(where: {name_EQ: $name}) { name currentlyActingIn { title @@ -346,9 +346,9 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($name: String, $title: String) { - actors(where: {name: $name}) { + actors(where: {name_EQ: $name}) { name - actedIn(where: {title: $title}) { + actedIn(where: {title_EQ: $title}) { title ... on Movie { runtime diff --git a/core/src/test/resources/integration-test-files/interfaces/relationships/read.js.adoc b/core/src/test/resources/integration-test-files/interfaces/relationships/read.js.adoc index f643d3be..f089ab7d 100644 --- a/core/src/test/resources/integration-test-files/interfaces/relationships/read.js.adoc +++ b/core/src/test/resources/integration-test-files/interfaces/relationships/read.js.adoc @@ -13,12 +13,12 @@ interface Production { title: String! } -type Movie implements Production { +type Movie implements Production @node { title: String! runtime: Int! } -type Series implements Production { +type Series implements Production @node { title: String! episodes: Int! } @@ -27,7 +27,7 @@ type ActedIn @relationshipProperties { screenTime: Int! } -type Actor { +type Actor @node { name: String! currentlyActingIn: Production @relationship(type: "CURRENTLY_ACTING_IN", direction: OUT) actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") @@ -48,7 +48,7 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($name: String) { - actors(where: {name: $name}) { + actors(where: {name_EQ: $name}) { name actedIn { title @@ -139,9 +139,9 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($name: String) { - actors(where: {name: $name}) { + actors(where: {name_EQ: $name}) { name - actedIn(options: {sort: [{title: DESC}]}) { + actedIn(sort: [{title: DESC}]) { title ... on Movie { runtime @@ -240,7 +240,7 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($name: String) { - actors(where: {name: $name}) { + actors(where: {name_EQ: $name}) { name currentlyActingIn { title @@ -326,9 +326,9 @@ CREATE (a:Actor { name: "RandomString1" }) [source,graphql,request=true] ---- query Actors($name: String, $title: String) { - actors(where: {name: $name}) { + actors(where: {name_EQ: $name}) { name - actedIn(where: {title: $title}) { + actedIn(where: {title_EQ: $title}) { title ... on Movie { runtime diff --git a/core/src/test/resources/integration-test-files/issues/1683.adoc b/core/src/test/resources/integration-test-files/issues/1683.adoc index b4c9bfe2..769b2360 100644 --- a/core/src/test/resources/integration-test-files/issues/1683.adoc +++ b/core/src/test/resources/integration-test-files/issues/1683.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type System { +type System @node { code: String! updatesData: [GovernedData!]! @relationship(type: "UPDATED_BY", direction: IN) } -type GovernedData { +type GovernedData @node { code: String! updatedBy: [System!]! @relationship(type: "UPDATED_BY", direction: OUT) } diff --git a/core/src/test/resources/integration-test-files/issues/1683.js.adoc b/core/src/test/resources/integration-test-files/issues/1683.js.adoc index 235bbc20..0f29e52a 100644 --- a/core/src/test/resources/integration-test-files/issues/1683.js.adoc +++ b/core/src/test/resources/integration-test-files/issues/1683.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type System { +type System @node { code: String! updatesData: [GovernedData!]! @relationship(type: "UPDATED_BY", direction: IN) } -type GovernedData { +type GovernedData @node { code: String! updatedBy: [System!]! @relationship(type: "UPDATED_BY", direction: OUT) } diff --git a/core/src/test/resources/integration-test-files/issues/1686.adoc b/core/src/test/resources/integration-test-files/issues/1686.adoc index c93e70f3..4f93cd75 100644 --- a/core/src/test/resources/integration-test-files/issues/1686.adoc +++ b/core/src/test/resources/integration-test-files/issues/1686.adoc @@ -13,13 +13,13 @@ interface Production { title: String } -type Movie implements Production { +type Movie implements Production @node { id: ID title: String genres: [Genre!]! @relationship(type: "HAS_GENRE", direction: OUT) } -type Genre { +type Genre @node { name: String movies: [Production!]! @relationship(type: "HAS_GENRE", direction: IN) } diff --git a/core/src/test/resources/integration-test-files/issues/1686.js.adoc b/core/src/test/resources/integration-test-files/issues/1686.js.adoc index 52795bec..d986cdeb 100644 --- a/core/src/test/resources/integration-test-files/issues/1686.js.adoc +++ b/core/src/test/resources/integration-test-files/issues/1686.js.adoc @@ -14,13 +14,13 @@ interface Production { title: String } -type Movie implements Production { +type Movie implements Production @node { id: ID title: String genres: [Genre!]! @relationship(type: "HAS_GENRE", direction: OUT) } -type Genre { +type Genre @node { name: String movies: [Production!]! @relationship(type: "HAS_GENRE", direction: IN) } diff --git a/core/src/test/resources/integration-test-files/issues/1687.adoc b/core/src/test/resources/integration-test-files/issues/1687.adoc index 669eec98..6f5d7843 100644 --- a/core/src/test/resources/integration-test-files/issues/1687.adoc +++ b/core/src/test/resources/integration-test-files/issues/1687.adoc @@ -13,13 +13,13 @@ interface Production { title: String } -type Movie implements Production { +type Movie implements Production @node { id: ID title: String genres: [Genre!]! @relationship(type: "HAS_GENRE", direction: OUT) } -type Genre { +type Genre @node { name: String movies: [Production!]! @relationship(type: "HAS_GENRE", direction: IN) } @@ -39,7 +39,7 @@ CREATE (c:Movie { id: "1", title: "Matrix" })-[:HAS_GENRE]->(:Genre { id: "10", [source,graphql,request=true] ---- query Genres { - genres(where: {moviesConnection_SOME: {node: {title: "Matrix"}}}) { + genres(where: {moviesConnection_SOME: {node: {title_EQ: "Matrix"}}}) { name } } @@ -58,7 +58,7 @@ query Genres { ---- MATCH (this:Genre) WHERE EXISTS { - MATCH (this0)-[edge:HAS_GENRE]->(this) + MATCH (this0)-[edge0:HAS_GENRE]->(this) WHERE (this0.title = $param0 AND this0:Movie) } diff --git a/core/src/test/resources/integration-test-files/issues/1687.js.adoc b/core/src/test/resources/integration-test-files/issues/1687.js.adoc index 7b48ff2e..3de1145d 100644 --- a/core/src/test/resources/integration-test-files/issues/1687.js.adoc +++ b/core/src/test/resources/integration-test-files/issues/1687.js.adoc @@ -14,13 +14,13 @@ interface Production { title: String } -type Movie implements Production { +type Movie implements Production @node { id: ID title: String genres: [Genre!]! @relationship(type: "HAS_GENRE", direction: OUT) } -type Genre { +type Genre @node { name: String movies: [Production!]! @relationship(type: "HAS_GENRE", direction: IN) } @@ -40,7 +40,7 @@ CREATE (c:Movie { id: "1", title: "Matrix" })-[:HAS_GENRE]->(:Genre { id: "10", [source,graphql,request=true] ---- query Genres { - genres(where: {moviesConnection_SOME: {node: {title: "Matrix"}}}) { + genres(where: {moviesConnection_SOME: {node: {title_EQ: "Matrix"}}}) { name } } @@ -71,10 +71,10 @@ RETURN this { .name } AS this { "genres": [ { - "name": "Action" + "name": "Sci-fi" }, { - "name": "Sci-fi" + "name": "Action" } ] } diff --git a/core/src/test/resources/integration-test-files/issues/1779.adoc b/core/src/test/resources/integration-test-files/issues/1779.adoc index 0940907b..f2052241 100644 --- a/core/src/test/resources/integration-test-files/issues/1779.adoc +++ b/core/src/test/resources/integration-test-files/issues/1779.adoc @@ -8,13 +8,13 @@ .Schema [source,graphql,schema=true] ---- -type Person { +type Person @node { name: String age: Int attends: [School!]! @relationship(type: "ATTENDS", direction: OUT) } -type School { +type School @node { name: String students: [Person!]! @relationship(type: "ATTENDS", direction: IN) } diff --git a/core/src/test/resources/integration-test-files/issues/1779.js.adoc b/core/src/test/resources/integration-test-files/issues/1779.js.adoc index 9cb2b546..98136230 100644 --- a/core/src/test/resources/integration-test-files/issues/1779.js.adoc +++ b/core/src/test/resources/integration-test-files/issues/1779.js.adoc @@ -9,13 +9,13 @@ .Schema [source,graphql,schema=true] ---- -type Person { +type Person @node { name: String age: Int attends: [School!]! @relationship(type: "ATTENDS", direction: OUT) } -type School { +type School @node { name: String students: [Person!]! @relationship(type: "ATTENDS", direction: IN) } @@ -79,7 +79,7 @@ RETURN this { .name, attends: var3 } AS this { "people": [ { - "name": "B", + "name": "A", "attends": [ { "name": "Old" @@ -87,11 +87,11 @@ RETURN this { .name, attends: var3 } AS this ] }, { - "name": "C", + "name": "D", "attends": [] }, { - "name": "A", + "name": "B", "attends": [ { "name": "Old" @@ -99,7 +99,7 @@ RETURN this { .name, attends: var3 } AS this ] }, { - "name": "D", + "name": "C", "attends": [] } ] diff --git a/core/src/test/resources/integration-test-files/issues/190.adoc b/core/src/test/resources/integration-test-files/issues/190.adoc new file mode 100644 index 00000000..a2ee0981 --- /dev/null +++ b/core/src/test/resources/integration-test-files/issues/190.adoc @@ -0,0 +1,191 @@ +:toc: +:toclevels: 42 + += https://github.com/neo4j/graphql/issues/190 + +== Setup + +.Schema +[source,graphql,schema=true] +---- +type User @node { + client_id: String + uid: String + demographics: [UserDemographics!]! @relationship(type: "HAS_DEMOGRAPHIC", direction: OUT) +} + +type UserDemographics @node { + client_id: String + type: String + value: String + users: [User!]! @relationship(type: "HAS_DEMOGRAPHIC", direction: IN) +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (user1:User {uid: 'user1'}),(user2:User {uid: 'user2'}),(female:UserDemographics{type:'Gender',value:'Female'}),(male:UserDemographics{type:'Gender',value:'Male'}),(age:UserDemographics{type:'Age',value:'50+'}),(state:UserDemographics{type:'State',value:'VIC'}) + CREATE (user1)-[:HAS_DEMOGRAPHIC]->(female) + CREATE (user2)-[:HAS_DEMOGRAPHIC]->(male) + CREATE (user1)-[:HAS_DEMOGRAPHIC]->(age) + CREATE (user2)-[:HAS_DEMOGRAPHIC]->(age) + CREATE (user1)-[:HAS_DEMOGRAPHIC]->(state) + CREATE (user2)-[:HAS_DEMOGRAPHIC]->(state) +---- + +== Example 1 + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + users(where: {demographics_SOME: {type_EQ: "Gender", value_EQ: "Female"}}) { + uid + demographics { + type + value + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Gender", + "param1" : "Female" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:User) +WHERE EXISTS { + MATCH (this)-[:HAS_DEMOGRAPHIC]->(this0:UserDemographics) + WHERE (this0.type = $param0 + AND this0.value = $param1) +} +CALL { + WITH this + MATCH (this)-[hasDemographic0:HAS_DEMOGRAPHIC]->(userDemographics0:UserDemographics) + WITH userDemographics0 { + .type, + .value + } AS demographics + RETURN collect(demographics) AS demographics +} +RETURN this { + .uid, + demographics: demographics +} AS this +---- + +.GraphQL-Response +[source,json,response=true,ignore-order] +---- +{ + "users" : [ { + "uid" : "user1", + "demographics" : [ { + "type" : "Gender", + "value" : "Female" + }, { + "type" : "Age", + "value" : "50+" + }, { + "type" : "State", + "value" : "VIC" + } ] + } ] +} +---- + +== Example 2 + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + users( + where: {demographics_SOME: {OR: [{type_EQ: "Gender", value_EQ: "Female"}, {type_EQ: "State"}, {type_EQ: "Age"}]}} + ) { + uid + demographics { + type + value + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Gender", + "param1" : "Female", + "param2" : "State", + "param3" : "Age" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:User) +WHERE EXISTS { + MATCH (this)-[:HAS_DEMOGRAPHIC]->(this0:UserDemographics) + WHERE ((this0.type = $param0 + AND this0.value = $param1) + OR this0.type = $param2 + OR this0.type = $param3) +} +CALL { + WITH this + MATCH (this)-[hasDemographic0:HAS_DEMOGRAPHIC]->(userDemographics0:UserDemographics) + WITH userDemographics0 { + .type, + .value + } AS demographics + RETURN collect(demographics) AS demographics +} +RETURN this { + .uid, + demographics: demographics +} AS this +---- + +.GraphQL-Response +[source,json,response=true,ignore-order] +---- +{ + "users" : [ { + "uid" : "user1", + "demographics" : [ { + "type" : "Gender", + "value" : "Female" + }, { + "type" : "Age", + "value" : "50+" + }, { + "type" : "State", + "value" : "VIC" + } ] + }, { + "uid" : "user2", + "demographics" : [ { + "type" : "Age", + "value" : "50+" + }, { + "type" : "Gender", + "value" : "Male" + }, { + "type" : "State", + "value" : "VIC" + } ] + } ] +} +---- diff --git a/core/src/test/resources/integration-test-files/issues/190.js.adoc b/core/src/test/resources/integration-test-files/issues/190.js.adoc new file mode 100644 index 00000000..65485b7f --- /dev/null +++ b/core/src/test/resources/integration-test-files/issues/190.js.adoc @@ -0,0 +1,193 @@ +// This file was generated by the Test-Case extractor of neo4j-graphql +:toc: +:toclevels: 42 + += https://github.com/neo4j/graphql/issues/190 + +== Setup + +.Schema +[source,graphql,schema=true] +---- +type User @node { + client_id: String + uid: String + demographics: [UserDemographics!]! @relationship(type: "HAS_DEMOGRAPHIC", direction: OUT) +} + +type UserDemographics @node { + client_id: String + type: String + value: String + users: [User!]! @relationship(type: "HAS_DEMOGRAPHIC", direction: IN) +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (user1:User {uid: 'user1'}),(user2:User {uid: 'user2'}),(female:UserDemographics{type:'Gender',value:'Female'}),(male:UserDemographics{type:'Gender',value:'Male'}),(age:UserDemographics{type:'Age',value:'50+'}),(state:UserDemographics{type:'State',value:'VIC'}) + CREATE (user1)-[:HAS_DEMOGRAPHIC]->(female) + CREATE (user2)-[:HAS_DEMOGRAPHIC]->(male) + CREATE (user1)-[:HAS_DEMOGRAPHIC]->(age) + CREATE (user2)-[:HAS_DEMOGRAPHIC]->(age) + CREATE (user1)-[:HAS_DEMOGRAPHIC]->(state) + CREATE (user2)-[:HAS_DEMOGRAPHIC]->(state) +---- + +== Example 1 + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + users(where: {demographics_SOME: {type_EQ: "Gender", value_EQ: "Female"}}) { + uid + demographics { + type + value + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Gender", + "param1": "Female" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:User) +WHERE EXISTS { + MATCH (this)-[:HAS_DEMOGRAPHIC]->(this0:UserDemographics) + WHERE (this0.type = $param0 AND this0.value = $param1) +} +CALL { + WITH this + MATCH (this)-[this1:HAS_DEMOGRAPHIC]->(this2:UserDemographics) + WITH this2 { .type, .value } AS this2 + RETURN collect(this2) AS var3 +} +RETURN this { .uid, demographics: var3 } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "users": [ + { + "uid": "user1", + "demographics": [ + { + "type": "Gender", + "value": "Female" + }, + { + "type": "Age", + "value": "50+" + }, + { + "type": "State", + "value": "VIC" + } + ] + } + ] +} +---- + +== Example 2 + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + users( + where: {demographics_SOME: {OR: [{type_EQ: "Gender", value_EQ: "Female"}, {type_EQ: "State"}, {type_EQ: "Age"}]}} + ) { + uid + demographics { + type + value + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Gender", + "param1": "Female", + "param2": "State", + "param3": "Age" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:User) +WHERE EXISTS { + MATCH (this)-[:HAS_DEMOGRAPHIC]->(this0:UserDemographics) + WHERE ((this0.type = $param0 AND this0.value = $param1) OR this0.type = $param2 OR this0.type = $param3) +} +CALL { + WITH this + MATCH (this)-[this1:HAS_DEMOGRAPHIC]->(this2:UserDemographics) + WITH this2 { .type, .value } AS this2 + RETURN collect(this2) AS var3 +} +RETURN this { .uid, demographics: var3 } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "users": [ + { + "uid": "user1", + "demographics": [ + { + "type": "Gender", + "value": "Female" + }, + { + "type": "Age", + "value": "50+" + }, + { + "type": "State", + "value": "VIC" + } + ] + }, + { + "uid": "user2", + "demographics": [ + { + "type": "Gender", + "value": "Male" + }, + { + "type": "Age", + "value": "50+" + }, + { + "type": "State", + "value": "VIC" + } + ] + } + ] +} +---- diff --git a/core/src/test/resources/integration-test-files/issues/207.adoc b/core/src/test/resources/integration-test-files/issues/207.adoc index 4d8dda5f..dfb6378b 100644 --- a/core/src/test/resources/integration-test-files/issues/207.adoc +++ b/core/src/test/resources/integration-test-files/issues/207.adoc @@ -10,11 +10,11 @@ ---- union Result = Book | Author -type Book { +type Book @node { title: String } -type Author { +type Author @node { name: String } diff --git a/core/src/test/resources/integration-test-files/issues/207.js.adoc b/core/src/test/resources/integration-test-files/issues/207.js.adoc index c3fa8928..34904a9a 100644 --- a/core/src/test/resources/integration-test-files/issues/207.js.adoc +++ b/core/src/test/resources/integration-test-files/issues/207.js.adoc @@ -11,11 +11,11 @@ ---- union Result = Book | Author -type Book { +type Book @node { title: String } -type Author { +type Author @node { name: String } diff --git a/core/src/test/resources/integration-test-files/issues/2262.adoc b/core/src/test/resources/integration-test-files/issues/2262.adoc index 13ad8edc..2dee61e6 100644 --- a/core/src/test/resources/integration-test-files/issues/2262.adoc +++ b/core/src/test/resources/integration-test-files/issues/2262.adoc @@ -8,13 +8,13 @@ .Schema [source,graphql,schema=true] ---- -type Component { +type Component @node { uuid: String upstreamProcess: Process @relationship(type: "OUTPUT", direction: IN) downstreamProcesses: [Process!]! @relationship(type: "INPUT", direction: OUT) } -type Process { +type Process @node { uuid: String componentOutputs: [Component!]! @relationship(type: "OUTPUT", direction: OUT) componentInputs: [Component!]! @relationship(type: "INPUT", direction: IN) @@ -33,7 +33,7 @@ CREATE(:Component {uuid: "c1"})<-[:OUTPUT]-(:Process {uuid: "p1"}) [source,graphql,request=true] ---- query ComponentsProcesses { - components(where: {uuid: "c1"}) { + components(where: {uuid_EQ: "c1"}) { uuid upstreamProcessConnection { edges { diff --git a/core/src/test/resources/integration-test-files/issues/2262.js.adoc b/core/src/test/resources/integration-test-files/issues/2262.js.adoc index 43400d08..c674ec69 100644 --- a/core/src/test/resources/integration-test-files/issues/2262.js.adoc +++ b/core/src/test/resources/integration-test-files/issues/2262.js.adoc @@ -9,13 +9,13 @@ .Schema [source,graphql,schema=true] ---- -type Component { +type Component @node { uuid: String upstreamProcess: Process @relationship(type: "OUTPUT", direction: IN) downstreamProcesses: [Process!]! @relationship(type: "INPUT", direction: OUT) } -type Process { +type Process @node { uuid: String componentOutputs: [Component!]! @relationship(type: "OUTPUT", direction: OUT) componentInputs: [Component!]! @relationship(type: "INPUT", direction: IN) @@ -34,7 +34,7 @@ CREATE(:Component {uuid: "c1"})<-[:OUTPUT]-(:Process {uuid: "p1"}) [source,graphql,request=true] ---- query ComponentsProcesses { - components(where: {uuid: "c1"}) { + components(where: {uuid_EQ: "c1"}) { uuid upstreamProcessConnection { edges { diff --git a/core/src/test/resources/integration-test-files/issues/2820.adoc b/core/src/test/resources/integration-test-files/issues/2820.adoc index 419e80e4..8a507df1 100644 --- a/core/src/test/resources/integration-test-files/issues/2820.adoc +++ b/core/src/test/resources/integration-test-files/issues/2820.adoc @@ -12,17 +12,17 @@ interface Production { title: String! } -type Movie implements Production { +type Movie implements Production @node { title: String! } -type Series implements Production { +type Series implements Production @node { title: String! } union ProductionUnion = Movie | Series -type Actor { +type Actor @node { name: String! actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT) actedInUnion: [ProductionUnion!]! @relationship(type: "ACTED_IN", direction: OUT) diff --git a/core/src/test/resources/integration-test-files/issues/2820.js.adoc b/core/src/test/resources/integration-test-files/issues/2820.js.adoc index d5e7101d..a4e7e1c4 100644 --- a/core/src/test/resources/integration-test-files/issues/2820.js.adoc +++ b/core/src/test/resources/integration-test-files/issues/2820.js.adoc @@ -13,17 +13,17 @@ interface Production { title: String! } -type Movie implements Production { +type Movie implements Production @node { title: String! } -type Series implements Production { +type Series implements Production @node { title: String! } union ProductionUnion = Movie | Series -type Actor { +type Actor @node { name: String! actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT) actedInUnion: [ProductionUnion!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -174,13 +174,13 @@ RETURN this { actedInConnection: var4 } AS this { "node": { "__typename": "Series", - "title": "Friends" + "title": "House" } }, { "node": { "__typename": "Series", - "title": "House" + "title": "Friends" } } ] @@ -328,11 +328,11 @@ RETURN this { actedIn: var2 } AS this "actedIn": [ { "__typename": "Movie", - "title": "Friends" + "title": "House" }, { "__typename": "Movie", - "title": "House" + "title": "Friends" }, { "__typename": "Series", @@ -722,11 +722,11 @@ RETURN this { actedInUnion: var2 } AS this }, { "__typename": "Series", - "title": "Friends" + "title": "House" }, { "__typename": "Series", - "title": "House" + "title": "Friends" } ] } diff --git a/core/src/test/resources/integration-test-files/issues/2847.adoc b/core/src/test/resources/integration-test-files/issues/2847.adoc index a9e2db0e..be343c26 100644 --- a/core/src/test/resources/integration-test-files/issues/2847.adoc +++ b/core/src/test/resources/integration-test-files/issues/2847.adoc @@ -12,11 +12,11 @@ interface Product { name: String! } -type Movie implements Product { +type Movie implements Product @node { name: String! } -type Actor { +type Actor @node { name: String! product: Product @relationship(type: "HAS_PRODUCT", direction: OUT) } diff --git a/core/src/test/resources/integration-test-files/issues/2847.js.adoc b/core/src/test/resources/integration-test-files/issues/2847.js.adoc index c90e4d55..f999c484 100644 --- a/core/src/test/resources/integration-test-files/issues/2847.js.adoc +++ b/core/src/test/resources/integration-test-files/issues/2847.js.adoc @@ -13,11 +13,11 @@ interface Product { name: String! } -type Movie implements Product { +type Movie implements Product @node { name: String! } -type Actor { +type Actor @node { name: String! product: Product @relationship(type: "HAS_PRODUCT", direction: OUT) } diff --git a/core/src/test/resources/integration-test-files/issues/3009.adoc b/core/src/test/resources/integration-test-files/issues/3009.adoc index ccaff090..cba2f048 100644 --- a/core/src/test/resources/integration-test-files/issues/3009.adoc +++ b/core/src/test/resources/integration-test-files/issues/3009.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type User { +type User @node { joinedAt: Date! } ---- @@ -38,7 +38,7 @@ type User { .Schema [source,graphql,schema=true] ---- -type User { +type User @node { joinedAt: DateTime! } ---- diff --git a/core/src/test/resources/integration-test-files/issues/3009.js.adoc b/core/src/test/resources/integration-test-files/issues/3009.js.adoc index 47dd2589..20125807 100644 --- a/core/src/test/resources/integration-test-files/issues/3009.js.adoc +++ b/core/src/test/resources/integration-test-files/issues/3009.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type User { +type User @node { joinedAt: Date! } ---- @@ -41,7 +41,7 @@ type User { .Schema [source,graphql,schema=true] ---- -type User { +type User @node { joinedAt: DateTime! } ---- diff --git a/core/src/test/resources/integration-test-files/issues/3394.adoc b/core/src/test/resources/integration-test-files/issues/3394.adoc index b6d8cbbc..fabc23b0 100644 --- a/core/src/test/resources/integration-test-files/issues/3394.adoc +++ b/core/src/test/resources/integration-test-files/issues/3394.adoc @@ -8,11 +8,11 @@ .Schema [source,graphql,schema=true] ---- -type Employee { +type Employee @node { products: [Product!]! @relationship(type: "CAN_ACCESS", direction: OUT) } -type Product { +type Product @node { id: String! @alias(property: "fg_item_id") description: String! partNumber: ID! @alias(property: "fg_item") @@ -36,7 +36,7 @@ CREATE (e:Employee {fg_item_id: "p1", description: "a p1", fg_item: "part1"}) [source,graphql,request=true] ---- query listProducts { - products(options: {sort: {partNumber: DESC}}) { + products(sort: {partNumber: DESC}) { id partNumber description @@ -85,7 +85,7 @@ RETURN this { ---- query listProducts { employees { - products(options: {sort: {partNumber: DESC}}) { + products(sort: {partNumber: DESC}) { id partNumber description @@ -144,11 +144,11 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Employee { +type Employee @node { products: [Product!]! @relationship(type: "CAN_ACCESS", direction: OUT) } -type Product { +type Product @node { id: String! @alias(property: "fg_item_id") description: String! partNumber: ID! @alias(property: "fg_item") diff --git a/core/src/test/resources/integration-test-files/issues/3394.js.adoc b/core/src/test/resources/integration-test-files/issues/3394.js.adoc index 22cd3cda..7288940f 100644 --- a/core/src/test/resources/integration-test-files/issues/3394.js.adoc +++ b/core/src/test/resources/integration-test-files/issues/3394.js.adoc @@ -9,11 +9,11 @@ .Schema [source,graphql,schema=true] ---- -type Employee { +type Employee @node { products: [Product!]! @relationship(type: "CAN_ACCESS", direction: OUT) } -type Product { +type Product @node { id: String! @alias(property: "fg_item_id") description: String! partNumber: ID! @alias(property: "fg_item") @@ -37,7 +37,7 @@ CREATE (e:Employee {fg_item_id: "p1", description: "a p1", fg_item: "part1"}) [source,graphql,request=true] ---- query listProducts { - products(options: {sort: {partNumber: DESC}}) { + products(sort: {partNumber: DESC}) { id partNumber description @@ -86,7 +86,7 @@ RETURN this { .description, id: this.fg_item_id, partNumber: this.fg_item } AS t ---- query listProducts { employees { - products(options: {sort: {partNumber: DESC}}) { + products(sort: {partNumber: DESC}) { id partNumber description @@ -145,11 +145,11 @@ RETURN this { products: var2 } AS this .Schema [source,graphql,schema=true] ---- -type Employee { +type Employee @node { products: [Product!]! @relationship(type: "CAN_ACCESS", direction: OUT) } -type Product { +type Product @node { id: String! @alias(property: "fg_item_id") description: String! partNumber: ID! @alias(property: "fg_item") diff --git a/core/src/test/resources/integration-test-files/issues/360.adoc b/core/src/test/resources/integration-test-files/issues/360.adoc index 93139801..431b7517 100644 --- a/core/src/test/resources/integration-test-files/issues/360.adoc +++ b/core/src/test/resources/integration-test-files/issues/360.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Event { +type Event @node { id: ID! name: String start: DateTime @@ -32,7 +32,7 @@ CREATE (:Event {id: "A", name: "name1", start: datetime(), end: datetime()}) ---- query ($rangeStart: DateTime, $rangeEnd: DateTime, $activity: String) { events( - where: {AND: [{start_GTE: $rangeStart}, {start_LTE: $rangeEnd}, {activity: $activity}]} + where: {AND: [{start_GTE: $rangeStart}, {start_LTE: $rangeEnd}, {activity_EQ: $activity}]} ) { id } @@ -83,7 +83,7 @@ CREATE (:Event {id: "A", name: "name1", start: datetime(), end: datetime()}) ---- query ($rangeStart: DateTime, $rangeEnd: DateTime, $activity: String) { events( - where: {OR: [{start_GTE: $rangeStart}, {start_LTE: $rangeEnd}, {activity: $activity}]} + where: {OR: [{start_GTE: $rangeStart}, {start_LTE: $rangeEnd}, {activity_EQ: $activity}]} ) { id } @@ -134,7 +134,7 @@ CREATE (:Event {id: "A", name: "name1", start: datetime("2024-12-24T18:42:24.123 ---- query ($rangeStart: DateTime, $rangeEnd: DateTime, $activity: String) { events( - where: {OR: [{start_GTE: $rangeStart}, {start_LTE: $rangeEnd}, {activity: $activity}]} + where: {OR: [{start_GTE: $rangeStart}, {start_LTE: $rangeEnd}, {activity_EQ: $activity}]} ) { id } diff --git a/core/src/test/resources/integration-test-files/issues/360.js.adoc b/core/src/test/resources/integration-test-files/issues/360.js.adoc index 53b65346..72b094cc 100644 --- a/core/src/test/resources/integration-test-files/issues/360.js.adoc +++ b/core/src/test/resources/integration-test-files/issues/360.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Event { +type Event @node { id: ID! name: String start: DateTime @@ -33,7 +33,7 @@ CREATE (:Event {id: "A", name: "name1", start: datetime(), end: datetime()}) ---- query ($rangeStart: DateTime, $rangeEnd: DateTime, $activity: String) { events( - where: {AND: [{start_GTE: $rangeStart}, {start_LTE: $rangeEnd}, {activity: $activity}]} + where: {AND: [{start_GTE: $rangeStart}, {start_LTE: $rangeEnd}, {activity_EQ: $activity}]} ) { id } @@ -86,7 +86,7 @@ CREATE (:Event {id: "A", name: "name1", start: datetime(), end: datetime()}) ---- query ($rangeStart: DateTime, $rangeEnd: DateTime, $activity: String) { events( - where: {OR: [{start_GTE: $rangeStart}, {start_LTE: $rangeEnd}, {activity: $activity}]} + where: {OR: [{start_GTE: $rangeStart}, {start_LTE: $rangeEnd}, {activity_EQ: $activity}]} ) { id } @@ -112,10 +112,10 @@ RETURN this { .id } AS this { "events": [ { - "id": "A" + "id": "B" }, { - "id": "B" + "id": "A" }, { "id": "C" @@ -139,7 +139,7 @@ CREATE (:Event {id: "A", name: "name1", start: datetime("2024-12-24T18:42:24.123 ---- query ($rangeStart: DateTime, $rangeEnd: DateTime, $activity: String) { events( - where: {OR: [{start_GTE: $rangeStart}, {start_LTE: $rangeEnd}, {activity: $activity}]} + where: {OR: [{start_GTE: $rangeStart}, {start_LTE: $rangeEnd}, {activity_EQ: $activity}]} ) { id } @@ -177,14 +177,14 @@ RETURN this { .id } AS this ---- { "events": [ - { - "id": "C" - }, { "id": "B" }, { "id": "A" + }, + { + "id": "C" } ] } diff --git a/core/src/test/resources/integration-test-files/issues/4007.adoc b/core/src/test/resources/integration-test-files/issues/4007.adoc index bd475270..ad160078 100644 --- a/core/src/test/resources/integration-test-files/issues/4007.adoc +++ b/core/src/test/resources/integration-test-files/issues/4007.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -32,7 +32,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - m: movies(where: {title: "RandomString1"}) { + m: movies(where: {title_EQ: "RandomString1"}) { t: actorsConnection { e: edges { no: node { diff --git a/core/src/test/resources/integration-test-files/issues/4007.js.adoc b/core/src/test/resources/integration-test-files/issues/4007.js.adoc index 7e5c08a7..68db3d28 100644 --- a/core/src/test/resources/integration-test-files/issues/4007.js.adoc +++ b/core/src/test/resources/integration-test-files/issues/4007.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -33,7 +33,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - m: movies(where: {title: "RandomString1"}) { + m: movies(where: {title_EQ: "RandomString1"}) { t: actorsConnection { e: edges { no: node { @@ -89,12 +89,12 @@ RETURN this { t: var3 } AS this }, { "no": { - "ne": "C" + "ne": "B" } }, { "no": { - "ne": "B" + "ne": "C" } } ] diff --git a/core/src/test/resources/integration-test-files/issues/4015.adoc b/core/src/test/resources/integration-test-files/issues/4015.adoc index 5111d5c5..85d888dd 100644 --- a/core/src/test/resources/integration-test-files/issues/4015.adoc +++ b/core/src/test/resources/integration-test-files/issues/4015.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! surname: String movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) diff --git a/core/src/test/resources/integration-test-files/issues/4015.js.adoc b/core/src/test/resources/integration-test-files/issues/4015.js.adoc index ec8ead11..8e7aeaa8 100644 --- a/core/src/test/resources/integration-test-files/issues/4015.js.adoc +++ b/core/src/test/resources/integration-test-files/issues/4015.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! surname: String movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) diff --git a/core/src/test/resources/integration-test-files/issues/402.adoc b/core/src/test/resources/integration-test-files/issues/402.adoc index 68d8d021..79c4c43d 100644 --- a/core/src/test/resources/integration-test-files/issues/402.adoc +++ b/core/src/test/resources/integration-test-files/issues/402.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Event { +type Event @node { id: ID! area: Area! @relationship(type: "HAPPENS_IN", direction: OUT) } -type Area { +type Area @node { id: ID! } ---- @@ -28,7 +28,7 @@ CREATE (:Event {id: "RandomString1"})-[:HAPPENS_IN]->(:Area {id: "RandomString2" [source,graphql,request=true] ---- query ($area: [ID!]) { - events(where: {id: "RandomString1", area: {id_IN: $area}}) { + events(where: {id_EQ: "RandomString1", area: {id_IN: $area}}) { id area { id diff --git a/core/src/test/resources/integration-test-files/issues/402.js.adoc b/core/src/test/resources/integration-test-files/issues/402.js.adoc index 2e4774ad..baf2b15e 100644 --- a/core/src/test/resources/integration-test-files/issues/402.js.adoc +++ b/core/src/test/resources/integration-test-files/issues/402.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Event { +type Event @node { id: ID! area: Area! @relationship(type: "HAPPENS_IN", direction: OUT) } -type Area { +type Area @node { id: ID! } ---- @@ -29,7 +29,7 @@ CREATE (:Event {id: "RandomString1"})-[:HAPPENS_IN]->(:Area {id: "RandomString2" [source,graphql,request=true] ---- query ($area: [ID!]) { - events(where: {id: "RandomString1", area: {id_IN: $area}}) { + events(where: {id_EQ: "RandomString1", area: {id_IN: $area}}) { id area { id diff --git a/core/src/test/resources/integration-test-files/issues/4196.adoc b/core/src/test/resources/integration-test-files/issues/4196.adoc index cc9ac681..de0d9f33 100644 --- a/core/src/test/resources/integration-test-files/issues/4196.adoc +++ b/core/src/test/resources/integration-test-files/issues/4196.adoc @@ -8,17 +8,17 @@ .Schema [source,graphql,schema=true] ---- -type Foo { +type Foo @node { name: String bars: [Bar!]! @relationship(type: "relatesTo", direction: OUT) } -type Bar { +type Bar @node { name: String foobars: [FooBar!]! @relationship(type: "relatesTo", direction: OUT) } -type FooBar { +type FooBar @node { name: String bars: [FooBar!]! @relationship(type: "relatesTo", direction: IN) } @@ -40,7 +40,7 @@ MERGE (:Foo {name: "A"})-[:relatesTo]->(b1:Bar {name: "bar1"}) [source,graphql,request=true] ---- { - foos(options: {sort: {name: ASC}}) { + foos(sort: {name: ASC}) { name bars { foobars { diff --git a/core/src/test/resources/integration-test-files/issues/4196.js.adoc b/core/src/test/resources/integration-test-files/issues/4196.js.adoc index 16e4641d..bbeb4180 100644 --- a/core/src/test/resources/integration-test-files/issues/4196.js.adoc +++ b/core/src/test/resources/integration-test-files/issues/4196.js.adoc @@ -9,17 +9,17 @@ .Schema [source,graphql,schema=true] ---- -type Foo { +type Foo @node { name: String bars: [Bar!]! @relationship(type: "relatesTo", direction: OUT) } -type Bar { +type Bar @node { name: String foobars: [FooBar!]! @relationship(type: "relatesTo", direction: OUT) } -type FooBar { +type FooBar @node { name: String bars: [FooBar!]! @relationship(type: "relatesTo", direction: IN) } @@ -41,7 +41,7 @@ MERGE (:Foo {name: "A"})-[:relatesTo]->(b1:Bar {name: "bar1"}) [source,graphql,request=true] ---- { - foos(options: {sort: {name: ASC}}) { + foos(sort: {name: ASC}) { name bars { foobars { diff --git a/core/src/test/resources/integration-test-files/issues/4287.adoc b/core/src/test/resources/integration-test-files/issues/4287.adoc index 2be1369e..a73b6594 100644 --- a/core/src/test/resources/integration-test-files/issues/4287.adoc +++ b/core/src/test/resources/integration-test-files/issues/4287.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String actedIn: [Production!]! @relationship(type: "ACTED_IN", properties: "actedIn", direction: OUT) } @@ -21,12 +21,12 @@ interface Production { title: String } -type Movie implements Production { +type Movie implements Production @node { title: String runtime: Int } -type Series implements Production { +type Series implements Production @node { title: String episodes: Int } @@ -50,7 +50,7 @@ CREATE (a:Actor { name: "Someone" }) { actors { actedInConnection( - where: {OR: [{node: {title: "something"}}, {node: {title: "whatever"}}]} + where: {OR: [{node: {title_EQ: "something"}}, {node: {title_EQ: "whatever"}}]} ) { edges { node { diff --git a/core/src/test/resources/integration-test-files/issues/4287.js.adoc b/core/src/test/resources/integration-test-files/issues/4287.js.adoc index 3e11d962..1eb365a6 100644 --- a/core/src/test/resources/integration-test-files/issues/4287.js.adoc +++ b/core/src/test/resources/integration-test-files/issues/4287.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String actedIn: [Production!]! @relationship(type: "ACTED_IN", properties: "actedIn", direction: OUT) } @@ -22,12 +22,12 @@ interface Production { title: String } -type Movie implements Production { +type Movie implements Production @node { title: String runtime: Int } -type Series implements Production { +type Series implements Production @node { title: String episodes: Int } @@ -51,7 +51,7 @@ CREATE (a:Actor { name: "Someone" }) { actors { actedInConnection( - where: {OR: [{node: {title: "something"}}, {node: {title: "whatever"}}]} + where: {OR: [{node: {title_EQ: "something"}}, {node: {title_EQ: "whatever"}}]} ) { edges { node { diff --git a/core/src/test/resources/integration-test-files/issues/433.adoc b/core/src/test/resources/integration-test-files/issues/433.adoc index 2643432f..e272ae3a 100644 --- a/core/src/test/resources/integration-test-files/issues/433.adoc +++ b/core/src/test/resources/integration-test-files/issues/433.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) } -type Person { +type Person @node { name: String } ---- @@ -28,7 +28,7 @@ CREATE (:Movie {title: "RandomString1"})<-[:ACTED_IN]-(:Person {name: "RandomStr [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { title actorsConnection(where: {}) { edges { diff --git a/core/src/test/resources/integration-test-files/issues/433.js.adoc b/core/src/test/resources/integration-test-files/issues/433.js.adoc index d88dacd3..6e6a4790 100644 --- a/core/src/test/resources/integration-test-files/issues/433.js.adoc +++ b/core/src/test/resources/integration-test-files/issues/433.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) } -type Person { +type Person @node { name: String } ---- @@ -29,7 +29,7 @@ CREATE (:Movie {title: "RandomString1"})<-[:ACTED_IN]-(:Person {name: "RandomStr [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { title actorsConnection(where: {}) { edges { diff --git a/core/src/test/resources/integration-test-files/issues/4450.adoc b/core/src/test/resources/integration-test-files/issues/4450.adoc index 452a0cef..05ebac98 100644 --- a/core/src/test/resources/integration-test-files/issues/4450.adoc +++ b/core/src/test/resources/integration-test-files/issues/4450.adoc @@ -8,18 +8,18 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String scene: [Scene!]! @relationship(type: "IN_SCENE", properties: "ActorScene", direction: OUT) } -type Scene { +type Scene @node { number: Int actors: [Actor!]! @relationship(type: "IN_SCENE", properties: "ActorScene", direction: IN) location: Location! @relationship(type: "AT_LOCATION", direction: OUT) } -type Location { +type Location @node { city: String scenes: [Scene!]! @relationship(type: "AT_LOCATION", direction: IN) } @@ -42,7 +42,7 @@ CREATE (:Actor {name: "actor-1"})-[:IN_SCENE {cut: true}]->(:Scene {number: 1})- ---- { actors( - where: {sceneConnection_SOME: {edge: {cut: true}, node: {location: {city: "test"}}}} + where: {sceneConnection_SOME: {edge: {cut_EQ: true}, node: {location: {city_EQ: "test"}}}} ) { name } @@ -63,12 +63,12 @@ CREATE (:Actor {name: "actor-1"})-[:IN_SCENE {cut: true}]->(:Scene {number: 1})- ---- MATCH (this:Actor) WHERE EXISTS { - MATCH (this)-[edge:IN_SCENE]->(this0:Scene) + MATCH (this)-[edge0:IN_SCENE]->(this0:Scene) WHERE (EXISTS { MATCH (this0)-[:AT_LOCATION]->(this00:Location) WHERE this00.city = $param0 } - AND edge.cut = $param1) + AND edge0.cut = $param1) } RETURN this { .name diff --git a/core/src/test/resources/integration-test-files/issues/4450.js.adoc b/core/src/test/resources/integration-test-files/issues/4450.js.adoc index ccf21b8a..bbb220ad 100644 --- a/core/src/test/resources/integration-test-files/issues/4450.js.adoc +++ b/core/src/test/resources/integration-test-files/issues/4450.js.adoc @@ -9,18 +9,18 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String scene: [Scene!]! @relationship(type: "IN_SCENE", properties: "ActorScene", direction: OUT) } -type Scene { +type Scene @node { number: Int actors: [Actor!]! @relationship(type: "IN_SCENE", properties: "ActorScene", direction: IN) location: Location! @relationship(type: "AT_LOCATION", direction: OUT) } -type Location { +type Location @node { city: String scenes: [Scene!]! @relationship(type: "AT_LOCATION", direction: IN) } @@ -43,7 +43,7 @@ CREATE (:Actor {name: "actor-1"})-[:IN_SCENE {cut: true}]->(:Scene {number: 1})- ---- { actors( - where: {sceneConnection_SOME: {edge: {cut: true}, node: {location: {city: "test"}}}} + where: {sceneConnection_SOME: {edge: {cut_EQ: true}, node: {location: {city_EQ: "test"}}}} ) { name } @@ -67,13 +67,13 @@ CALL { WITH this MATCH (this)-[this0:IN_SCENE]->(this1:Scene) OPTIONAL MATCH (this1)-[:AT_LOCATION]->(this2:Location) - WITH *, count(this2) AS locationCount + WITH *, count(this2) AS var3 WITH * - WHERE ((locationCount <> 0 AND this2.city = $param0) AND this0.cut = $param1) - RETURN count(this1) > 0 AS var3 + WHERE ((var3 <> 0 AND this2.city = $param0) AND this0.cut = $param1) + RETURN count(this1) > 0 AS var4 } WITH * -WHERE var3 = true +WHERE var4 = true RETURN this { .name } AS this ---- diff --git a/core/src/test/resources/integration-test-files/issues/4532.adoc b/core/src/test/resources/integration-test-files/issues/4532.adoc index 94fda4d7..90d0e5e5 100644 --- a/core/src/test/resources/integration-test-files/issues/4532.adoc +++ b/core/src/test/resources/integration-test-files/issues/4532.adoc @@ -10,12 +10,12 @@ .Schema [source,graphql,schema=true] ---- -type Inventory { +type Inventory @node { id: ID children: [Scenario!]! @relationship(type: "HasChildren", properties: "InventoryChildRelation", direction: OUT) } -type Scenario { +type Scenario @node { id: ID } @@ -147,7 +147,7 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Inventory { +type Inventory @node { id: ID children: [Scenario!]! @relationship(type: "HasChildren", properties: "InventoryChildRelation", direction: OUT) } @@ -156,11 +156,11 @@ interface Scenario { id: ID } -type Image implements Scenario { +type Image implements Scenario @node { id: ID } -type Video implements Scenario { +type Video implements Scenario @node { id: ID } diff --git a/core/src/test/resources/integration-test-files/issues/4532.js.adoc b/core/src/test/resources/integration-test-files/issues/4532.js.adoc index 2e0e6019..a341d663 100644 --- a/core/src/test/resources/integration-test-files/issues/4532.js.adoc +++ b/core/src/test/resources/integration-test-files/issues/4532.js.adoc @@ -11,12 +11,12 @@ .Schema [source,graphql,schema=true] ---- -type Inventory { +type Inventory @node { id: ID children: [Scenario!]! @relationship(type: "HasChildren", properties: "InventoryChildRelation", direction: OUT) } -type Scenario { +type Scenario @node { id: ID } @@ -139,7 +139,7 @@ RETURN this { .id, childrenConnection: var3 } AS this .Schema [source,graphql,schema=true] ---- -type Inventory { +type Inventory @node { id: ID children: [Scenario!]! @relationship(type: "HasChildren", properties: "InventoryChildRelation", direction: OUT) } @@ -148,11 +148,11 @@ interface Scenario { id: ID } -type Image implements Scenario { +type Image implements Scenario @node { id: ID } -type Video implements Scenario { +type Video implements Scenario @node { id: ID } diff --git a/core/src/test/resources/integration-test-files/issues/4667.adoc b/core/src/test/resources/integration-test-files/issues/4667.adoc index 76385d34..f1c7dbe3 100644 --- a/core/src/test/resources/integration-test-files/issues/4667.adoc +++ b/core/src/test/resources/integration-test-files/issues/4667.adoc @@ -17,12 +17,12 @@ CREATE (:MyThing {id: "A"})-[:THE_STUFF]->(b1:MyStuff {id: "C"}) .Schema [source,graphql,schema=true] ---- -type MyThing { +type MyThing @node { id: ID! @id stuff: MyStuff @relationship(type: "THE_STUFF", direction: OUT) } -type MyStuff { +type MyStuff @node { id: ID! @id thing: MyThing @relationship(type: "THE_STUFF", direction: IN) } diff --git a/core/src/test/resources/integration-test-files/issues/4667.js.adoc b/core/src/test/resources/integration-test-files/issues/4667.js.adoc index 7d0d3f05..e5d220ce 100644 --- a/core/src/test/resources/integration-test-files/issues/4667.js.adoc +++ b/core/src/test/resources/integration-test-files/issues/4667.js.adoc @@ -18,12 +18,12 @@ CREATE (:MyThing {id: "A"})-[:THE_STUFF]->(b1:MyStuff {id: "C"}) .Schema [source,graphql,schema=true] ---- -type MyThing { +type MyThing @node { id: ID! @id stuff: MyStuff @relationship(type: "THE_STUFF", direction: OUT) } -type MyStuff { +type MyStuff @node { id: ID! @id thing: MyThing @relationship(type: "THE_STUFF", direction: IN) } diff --git a/core/src/test/resources/integration-test-files/issues/5223-cartesian.js.adoc b/core/src/test/resources/integration-test-files/issues/5223-cartesian.js.adoc index 307d3696..7bf5c0ab 100644 --- a/core/src/test/resources/integration-test-files/issues/5223-cartesian.js.adoc +++ b/core/src/test/resources/integration-test-files/issues/5223-cartesian.js.adoc @@ -52,10 +52,7 @@ CREATE (:Location { id: "1", pointCoordinates: point({x: -14221.955504767046, y: [source,cypher] ---- MATCH (this:Location) -RETURN this { .id, pointCoordinates: CASE - WHEN this.pointCoordinates IS NOT NULL THEN { point: this.pointCoordinates, crs: this.pointCoordinates.crs } - ELSE NULL -END } AS this +RETURN this { .id, .pointCoordinates } AS this ---- .GraphQL-Response @@ -88,7 +85,7 @@ END } AS this "pointCoordinates": { "x": 261848.15527273554, "y": 6250566.54904563, - "z": 21, + "z": 21.0, "crs": "cartesian-3d", "srid": 9157 } @@ -136,10 +133,7 @@ CALL { WITH edges UNWIND edges AS edge WITH edge.node AS this0 - RETURN collect({ node: { id: this0.id, pointCoordinates: CASE - WHEN this0.pointCoordinates IS NOT NULL THEN { point: this0.pointCoordinates, crs: this0.pointCoordinates.crs } - ELSE NULL - END, __typename: "Location" } }) AS var1 + RETURN collect({ node: { id: this0.id, pointCoordinates: this0.pointCoordinates, __typename: "Location" } }) AS var1 } RETURN { edges: var1, totalCount: totalCount } AS this ---- @@ -180,7 +174,7 @@ RETURN { edges: var1, totalCount: totalCount } AS this "pointCoordinates": { "x": 261848.15527273554, "y": 6250566.54904563, - "z": 21, + "z": 21.0, "crs": "cartesian-3d", "srid": 9157 } @@ -219,10 +213,7 @@ RETURN { edges: var1, totalCount: totalCount } AS this [source,cypher] ---- MATCH (this:Location) -RETURN this { .id, pointCoordinates: CASE - WHEN this.pointCoordinates IS NOT NULL THEN { point: this.pointCoordinates, crs: this.pointCoordinates.crs } - ELSE NULL -END } AS this +RETURN this { .id, .pointCoordinates } AS this ---- .GraphQL-Response @@ -253,7 +244,7 @@ END } AS this "pointCoordinates": { "x": 261848.15527273554, "y": 6250566.54904563, - "z": 21, + "z": 21.0, "crs": "cartesian-3d" } } @@ -299,10 +290,7 @@ CALL { WITH edges UNWIND edges AS edge WITH edge.node AS this0 - RETURN collect({ node: { id: this0.id, pointCoordinates: CASE - WHEN this0.pointCoordinates IS NOT NULL THEN { point: this0.pointCoordinates, crs: this0.pointCoordinates.crs } - ELSE NULL - END, __typename: "Location" } }) AS var1 + RETURN collect({ node: { id: this0.id, pointCoordinates: this0.pointCoordinates, __typename: "Location" } }) AS var1 } RETURN { edges: var1, totalCount: totalCount } AS this ---- @@ -326,23 +314,23 @@ RETURN { edges: var1, totalCount: totalCount } AS this }, { "node": { - "id": "3", + "id": "2", "pointCoordinates": { - "x": 261848.15527273554, - "y": 6250566.54904563, - "z": 21, - "crs": "cartesian-3d" + "x": 1391088.9885668862, + "y": 5146427.7652232265, + "z": null, + "crs": "cartesian" } } }, { "node": { - "id": "2", + "id": "3", "pointCoordinates": { - "x": 1391088.9885668862, - "y": 5146427.7652232265, - "z": null, - "crs": "cartesian" + "x": 261848.15527273554, + "y": 6250566.54904563, + "z": 21.0, + "crs": "cartesian-3d" } } } diff --git a/core/src/test/resources/integration-test-files/issues/5223-point.js.adoc b/core/src/test/resources/integration-test-files/issues/5223-point.js.adoc index 47850e94..008bdaa6 100644 --- a/core/src/test/resources/integration-test-files/issues/5223-point.js.adoc +++ b/core/src/test/resources/integration-test-files/issues/5223-point.js.adoc @@ -52,10 +52,7 @@ CREATE (:Location { id: "1", pointCoordinates: point({longitude: -0.127758, lati [source,cypher] ---- MATCH (this:Location) -RETURN this { .id, pointCoordinates: CASE - WHEN this.pointCoordinates IS NOT NULL THEN { point: this.pointCoordinates, crs: this.pointCoordinates.crs } - ELSE NULL -END } AS this +RETURN this { .id, .pointCoordinates } AS this ---- .GraphQL-Response @@ -88,7 +85,7 @@ END } AS this "pointCoordinates": { "latitude": 48.856613, "longitude": 2.352222, - "height": 21, + "height": 21.0, "crs": "wgs-84-3d", "srid": 4979 } @@ -136,10 +133,7 @@ CALL { WITH edges UNWIND edges AS edge WITH edge.node AS this0 - RETURN collect({ node: { id: this0.id, pointCoordinates: CASE - WHEN this0.pointCoordinates IS NOT NULL THEN { point: this0.pointCoordinates, crs: this0.pointCoordinates.crs } - ELSE NULL - END, __typename: "Location" } }) AS var1 + RETURN collect({ node: { id: this0.id, pointCoordinates: this0.pointCoordinates, __typename: "Location" } }) AS var1 } RETURN { edges: var1, totalCount: totalCount } AS this ---- @@ -180,7 +174,7 @@ RETURN { edges: var1, totalCount: totalCount } AS this "pointCoordinates": { "latitude": 48.856613, "longitude": 2.352222, - "height": 21, + "height": 21.0, "crs": "wgs-84-3d", "srid": 4979 } @@ -219,10 +213,7 @@ RETURN { edges: var1, totalCount: totalCount } AS this [source,cypher] ---- MATCH (this:Location) -RETURN this { .id, pointCoordinates: CASE - WHEN this.pointCoordinates IS NOT NULL THEN { point: this.pointCoordinates, crs: this.pointCoordinates.crs } - ELSE NULL -END } AS this +RETURN this { .id, .pointCoordinates } AS this ---- .GraphQL-Response @@ -253,7 +244,7 @@ END } AS this "pointCoordinates": { "latitude": 48.856613, "longitude": 2.352222, - "height": 21, + "height": 21.0, "crs": "wgs-84-3d" } } @@ -299,10 +290,7 @@ CALL { WITH edges UNWIND edges AS edge WITH edge.node AS this0 - RETURN collect({ node: { id: this0.id, pointCoordinates: CASE - WHEN this0.pointCoordinates IS NOT NULL THEN { point: this0.pointCoordinates, crs: this0.pointCoordinates.crs } - ELSE NULL - END, __typename: "Location" } }) AS var1 + RETURN collect({ node: { id: this0.id, pointCoordinates: this0.pointCoordinates, __typename: "Location" } }) AS var1 } RETURN { edges: var1, totalCount: totalCount } AS this ---- @@ -319,7 +307,7 @@ RETURN { edges: var1, totalCount: totalCount } AS this "pointCoordinates": { "latitude": 48.856613, "longitude": 2.352222, - "height": 21, + "height": 21.0, "crs": "wgs-84-3d" } } diff --git a/core/src/test/resources/integration-test-files/issues/560.adoc b/core/src/test/resources/integration-test-files/issues/560.adoc index ac024885..31e1680a 100644 --- a/core/src/test/resources/integration-test-files/issues/560.adoc +++ b/core/src/test/resources/integration-test-files/issues/560.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Log { +type Log @node { id: ID! location: Point } @@ -75,7 +75,7 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Log { +type Log @node { id: ID! location: CartesianPoint } diff --git a/core/src/test/resources/integration-test-files/issues/560.js.adoc b/core/src/test/resources/integration-test-files/issues/560.js.adoc index 20f27a94..edc709fb 100644 --- a/core/src/test/resources/integration-test-files/issues/560.js.adoc +++ b/core/src/test/resources/integration-test-files/issues/560.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Log { +type Log @node { id: ID! location: Point } @@ -48,10 +48,7 @@ CREATE (j:Log { id: "RandomString1" }) [source,cypher] ---- MATCH (this:Log) -RETURN this { .id, location: CASE - WHEN this.location IS NOT NULL THEN { point: this.location, crs: this.location.crs } - ELSE NULL -END } AS this +RETURN this { .id, .location } AS this ---- .GraphQL-Response @@ -72,7 +69,7 @@ END } AS this .Schema [source,graphql,schema=true] ---- -type Log { +type Log @node { id: ID! location: CartesianPoint } @@ -111,10 +108,7 @@ CREATE (j:Log { id: "RandomString1" }) [source,cypher] ---- MATCH (this:Log) -RETURN this { .id, location: CASE - WHEN this.location IS NOT NULL THEN { point: this.location, crs: this.location.crs } - ELSE NULL -END } AS this +RETURN this { .id, .location } AS this ---- .GraphQL-Response diff --git a/core/src/test/resources/integration-test-files/issues/5698.adoc b/core/src/test/resources/integration-test-files/issues/5698.adoc new file mode 100644 index 00000000..85b8d5f2 --- /dev/null +++ b/core/src/test/resources/integration-test-files/issues/5698.adoc @@ -0,0 +1,116 @@ +:toc: +:toclevels: 42 + += https://github.com/neo4j/graphql/issues/5698 + +== Setup + +.Schema +[source,graphql,schema=true] +---- +type Movie @node{ + title: String + released: Int + director: Person! @relationship(type: "DIRECTED", direction: IN) + secondDirector: Person @relationship(type: "ALSO_DIRECTED", direction: IN) +} + +type Person @node { + name: String + directed: [Movie!]! @relationship(type: "DIRECTED", direction: OUT) +} +---- + +== should not return non-null 1-1 relationships when passing null + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie {title: "The Matrix", released: 1999})<-[:DIRECTED]-(:Person {name: "Keanu"}) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {released: 1999, director: null}) { + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : 1999 +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE (this.released = $param0 + AND NOT (EXISTS { + MATCH (this0:Person)-[:DIRECTED]->(this) + })) +RETURN this { + .title +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies" : [ ] +} +---- + +== should not return nullable 1-1 relationships when passing null + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie {title: "The Matrix", released: 1999})<-[:ALSO_DIRECTED]-(:Person {name: "Keanu"}) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {released: 1999, secondDirector: null}) { + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : 1999 +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE (this.released = $param0 + AND NOT (EXISTS { + MATCH (this0:Person)-[:ALSO_DIRECTED]->(this) + })) +RETURN this { + .title +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies" : [ ] +} +---- diff --git a/core/src/test/resources/integration-test-files/issues/5698.js.adoc b/core/src/test/resources/integration-test-files/issues/5698.js.adoc new file mode 100644 index 00000000..629337a1 --- /dev/null +++ b/core/src/test/resources/integration-test-files/issues/5698.js.adoc @@ -0,0 +1,112 @@ +// This file was generated by the Test-Case extractor of neo4j-graphql +:toc: +:toclevels: 42 + += https://github.com/neo4j/graphql/issues/5698 + +== Setup + +.Schema +[source,graphql,schema=true] +---- +type Movie { + title: String + released: Int + director: Person! @relationship(type: "DIRECTED", direction: IN) + secondDirector: Person @relationship(type: "ALSO_DIRECTED", direction: IN) +} + +type Person { + name: String + directed: [Movie!]! @relationship(type: "DIRECTED", direction: OUT) +} +---- + +== should not return non-null 1-1 relationships when passing null + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie {title: "The Matrix", released: 1999})<-[:DIRECTED]-(:Person {name: "Keanu"}) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {released: 1999, director: null}) { + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": 1999 +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +OPTIONAL MATCH (this)<-[:DIRECTED]-(this0:Person) +WITH *, count(this0) AS var1 +WITH * +WHERE (this.released = $param0 AND var1 = 0) +RETURN this { .title } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [] +} +---- + +== should not return nullable 1-1 relationships when passing null + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Movie {title: "The Matrix", released: 1999})<-[:ALSO_DIRECTED]-(:Person {name: "Keanu"}) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {released: 1999, secondDirector: null}) { + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": 1999 +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE (this.released = $param0 AND NOT (EXISTS { + MATCH (this)<-[:ALSO_DIRECTED]-(this0:Person) +})) +RETURN this { .title } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [] +} +---- diff --git a/core/src/test/resources/integration-test-files/issues/582.adoc b/core/src/test/resources/integration-test-files/issues/582.adoc new file mode 100644 index 00000000..d6685c5d --- /dev/null +++ b/core/src/test/resources/integration-test-files/issues/582.adoc @@ -0,0 +1,176 @@ +:toc: +:toclevels: 42 + += https://github.com/neo4j/graphql/issues/582 + +== Setup + +.Schema +[source,graphql,schema=true] +---- +type Entity @node { + children: [Entity!]! @relationship(type: "EDGE", properties: "Edge", direction: OUT) + parents: [Entity!]! @relationship(type: "EDGE", properties: "Edge", direction: IN) + type: String! +} + +type Edge @relationshipProperties { + type: String! +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Entity { type: "Cat" })-[:EDGE]->(:Entity { type: "Dog" })<-[:EDGE]-(:Entity { type: "Bird" })-[:EDGE]->(:Entity { type: "Fish" }) +---- + +== should get all Cats where there exists at least one child Dog that has a Bird parent + +.GraphQL-Query +[source,graphql,request=true] +---- +query ($where: EntityWhere) { + entities(where: $where) { + type + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "where" : { + "type_EQ" : "Cat", + "childrenConnection_SOME" : { + "node" : { + "type_EQ" : "Dog", + "parentsConnection_SOME" : { + "node" : { + "type_EQ" : "Bird" + } + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Bird", + "param1" : "Dog", + "param2" : "Cat" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Entity) +WHERE (EXISTS { + MATCH (this)-[edge0:EDGE]->(this0:Entity) + WHERE (EXISTS { + MATCH (this00:Entity)-[edge1:EDGE]->(this0) + WHERE this00.type = $param0 + } + AND this0.type = $param1) + } + AND this.type = $param2) +RETURN this { + .type +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "entities" : [ { + "type" : "Cat" + } ] +} +---- + +== should get all Cats where there exists at least one child Dog that has a Bird parent which has a Fish child + +.GraphQL-Query +[source,graphql,request=true] +---- +query ($where: EntityWhere) { + entities(where: $where) { + type + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "where" : { + "type_EQ" : "Cat", + "childrenConnection_SOME" : { + "node" : { + "type_EQ" : "Dog", + "parentsConnection_SOME" : { + "node" : { + "type_EQ" : "Bird", + "childrenConnection_SOME" : { + "node" : { + "type_EQ" : "Fish" + } + } + } + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Fish", + "param1" : "Bird", + "param2" : "Dog", + "param3" : "Cat" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Entity) +WHERE (EXISTS { + MATCH (this)-[edge0:EDGE]->(this0:Entity) + WHERE (EXISTS { + MATCH (this00:Entity)-[edge1:EDGE]->(this0) + WHERE (EXISTS { + MATCH (this00)-[edge2:EDGE]->(this000:Entity) + WHERE this000.type = $param0 + } + AND this00.type = $param1) + } + AND this0.type = $param2) + } + AND this.type = $param3) +RETURN this { + .type +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "entities" : [ { + "type" : "Cat" + } ] +} +---- diff --git a/core/src/test/resources/integration-test-files/issues/582.js.adoc b/core/src/test/resources/integration-test-files/issues/582.js.adoc new file mode 100644 index 00000000..dbe5dea2 --- /dev/null +++ b/core/src/test/resources/integration-test-files/issues/582.js.adoc @@ -0,0 +1,172 @@ +// This file was generated by the Test-Case extractor of neo4j-graphql +:toc: +:toclevels: 42 + += https://github.com/neo4j/graphql/issues/582 + +== Setup + +.Schema +[source,graphql,schema=true] +---- +type Entity @node { + children: [Entity!]! @relationship(type: "EDGE", properties: "Edge", direction: OUT) + parents: [Entity!]! @relationship(type: "EDGE", properties: "Edge", direction: IN) + type: String! +} + +type Edge @relationshipProperties { + type: String! +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Entity { type: "Cat" })-[:EDGE]->(:Entity { type: "Dog" })<-[:EDGE]-(:Entity { type: "Bird" })-[:EDGE]->(:Entity { type: "Fish" }) +---- + +== should get all Cats where there exists at least one child Dog that has a Bird parent + +.GraphQL-Query +[source,graphql,request=true] +---- +query ($where: EntityWhere) { + entities(where: $where) { + type + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "where": { + "type_EQ": "Cat", + "childrenConnection_SOME": { + "node": { + "type_EQ": "Dog", + "parentsConnection_SOME": { + "node": { + "type_EQ": "Bird" + } + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Cat", + "param1": "Dog", + "param2": "Bird" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Entity) +WHERE (this.type = $param0 AND EXISTS { + MATCH (this)-[this0:EDGE]->(this1:Entity) + WHERE (this1.type = $param1 AND EXISTS { + MATCH (this1)<-[this2:EDGE]-(this3:Entity) + WHERE this3.type = $param2 + }) +}) +RETURN this { .type } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "entities": [ + { + "type": "Cat" + } + ] +} +---- + +== should get all Cats where there exists at least one child Dog that has a Bird parent which has a Fish child + +.GraphQL-Query +[source,graphql,request=true] +---- +query ($where: EntityWhere) { + entities(where: $where) { + type + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "where": { + "type_EQ": "Cat", + "childrenConnection_SOME": { + "node": { + "type_EQ": "Dog", + "parentsConnection_SOME": { + "node": { + "type_EQ": "Bird", + "childrenConnection_SOME": { + "node": { + "type_EQ": "Fish" + } + } + } + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Cat", + "param1": "Dog", + "param2": "Bird", + "param3": "Fish" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Entity) +WHERE (this.type = $param0 AND EXISTS { + MATCH (this)-[this0:EDGE]->(this1:Entity) + WHERE (this1.type = $param1 AND EXISTS { + MATCH (this1)<-[this2:EDGE]-(this3:Entity) + WHERE (this3.type = $param2 AND EXISTS { + MATCH (this3)-[this4:EDGE]->(this5:Entity) + WHERE this5.type = $param3 + }) + }) +}) +RETURN this { .type } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "entities": [ + { + "type": "Cat" + } + ] +} +---- diff --git a/core/src/test/resources/integration-test-files/issues/583.adoc b/core/src/test/resources/integration-test-files/issues/583.adoc index 4f924a4b..44395ee3 100644 --- a/core/src/test/resources/integration-test-files/issues/583.adoc +++ b/core/src/test/resources/integration-test-files/issues/583.adoc @@ -16,24 +16,24 @@ interface Awardable { awardsGiven: Int! } -type Actor implements Awardable { +type Actor implements Awardable @node { id: ID! name: String awardsGiven: Int! actedIn: [Show!]! @relationship(type: "ACTED_IN", direction: OUT) } -type Movie implements Show & Awardable { +type Movie implements Show & Awardable @node { title: String awardsGiven: Int! } -type Series implements Show & Awardable { +type Series implements Show & Awardable @node { title: String awardsGiven: Int! } -type ShortFilm implements Show { +type ShortFilm implements Show @node { title: String } ---- @@ -57,7 +57,7 @@ CREATE (actor:Actor:Test) [source,graphql,request=true] ---- query ($actorId: ID!) { - actors(where: {id: $actorId}) { + actors(where: {id_EQ: $actorId}) { id name actedIn { diff --git a/core/src/test/resources/integration-test-files/issues/583.js.adoc b/core/src/test/resources/integration-test-files/issues/583.js.adoc index b69d8f6c..59a06ffe 100644 --- a/core/src/test/resources/integration-test-files/issues/583.js.adoc +++ b/core/src/test/resources/integration-test-files/issues/583.js.adoc @@ -17,24 +17,24 @@ interface Awardable { awardsGiven: Int! } -type Actor implements Awardable { +type Actor implements Awardable @node { id: ID! name: String awardsGiven: Int! actedIn: [Show!]! @relationship(type: "ACTED_IN", direction: OUT) } -type Movie implements Show & Awardable { +type Movie implements Show & Awardable @node { title: String awardsGiven: Int! } -type Series implements Show & Awardable { +type Series implements Show & Awardable @node { title: String awardsGiven: Int! } -type ShortFilm implements Show { +type ShortFilm implements Show @node { title: String } ---- @@ -58,7 +58,7 @@ CREATE (actor:Actor:Test) [source,graphql,request=true] ---- query ($actorId: ID!) { - actors(where: {id: $actorId}) { + actors(where: {id_EQ: $actorId}) { id name actedIn { diff --git a/core/src/test/resources/integration-test-files/issues/5887.adoc b/core/src/test/resources/integration-test-files/issues/5887.adoc new file mode 100644 index 00000000..61cbda8c --- /dev/null +++ b/core/src/test/resources/integration-test-files/issues/5887.adoc @@ -0,0 +1,442 @@ +:toc: +:toclevels: 42 + +== https://github.com/neo4j/graphql/issues/5887 + +=== Setup + +.Schema +[source,graphql,schema=true] +---- +interface Base { + id: ID! +} + +type A implements Base @node { + id: ID! +} + +type B implements Base @node { + id: ID! +} + +type Test @node { + base: Base! @relationship(type: "HAS", direction: OUT) +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Test)-[:HAS]->(:A {id: "1"}) + CREATE (:Test)-[:HAS]->(:B {id: "2"}) +---- + +=== should return relationship when first interface matches + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + tests(where: {base: {id: "1"}}) { + base { + id + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "1", + "param1" : "1" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Test) +WHERE (EXISTS { + MATCH (this)-[:HAS]->(this0:A) + WHERE this0.id = $param0 + } + OR EXISTS { + MATCH (this)-[:HAS]->(this1:B) + WHERE this1.id = $param1 + }) +CALL { + WITH this + CALL { + WITH * + MATCH (this)-[has0:HAS]->(a0:A) + WITH a0 { + __typename: 'A', + __id: elementId(a0), + .id + } AS a0 + RETURN a0 AS base UNION + WITH * + MATCH (this)-[has1:HAS]->(b0:B) + WITH b0 { + __typename: 'B', + __id: elementId(b0), + .id + } AS b0 + RETURN b0 AS base + } + WITH base + RETURN head(collect(base)) AS base +} +RETURN this { + base: base +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "tests" : [ { + "base" : { + "id" : "1" + } + } ] +} +---- + +=== should return relationship when second interface matches + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + tests(where: {base: {id: "2"}}) { + base { + id + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "2", + "param1" : "2" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Test) +WHERE (EXISTS { + MATCH (this)-[:HAS]->(this0:A) + WHERE this0.id = $param0 + } + OR EXISTS { + MATCH (this)-[:HAS]->(this1:B) + WHERE this1.id = $param1 + }) +CALL { + WITH this + CALL { + WITH * + MATCH (this)-[has0:HAS]->(a0:A) + WITH a0 { + __typename: 'A', + __id: elementId(a0), + .id + } AS a0 + RETURN a0 AS base UNION + WITH * + MATCH (this)-[has1:HAS]->(b0:B) + WITH b0 { + __typename: 'B', + __id: elementId(b0), + .id + } AS b0 + RETURN b0 AS base + } + WITH base + RETURN head(collect(base)) AS base +} +RETURN this { + base: base +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "tests" : [ { + "base" : { + "id" : "2" + } + } ] +} +---- + +=== should not return relationship when no interface match + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + tests(where: {base: {id: "x"}}) { + base { + id + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "x", + "param1" : "x" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Test) +WHERE (EXISTS { + MATCH (this)-[:HAS]->(this0:A) + WHERE this0.id = $param0 + } + OR EXISTS { + MATCH (this)-[:HAS]->(this1:B) + WHERE this1.id = $param1 + }) +CALL { + WITH this + CALL { + WITH * + MATCH (this)-[has0:HAS]->(a0:A) + WITH a0 { + __typename: 'A', + __id: elementId(a0), + .id + } AS a0 + RETURN a0 AS base UNION + WITH * + MATCH (this)-[has1:HAS]->(b0:B) + WITH b0 { + __typename: 'B', + __id: elementId(b0), + .id + } AS b0 + RETURN b0 AS base + } + WITH base + RETURN head(collect(base)) AS base +} +RETURN this { + base: base +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "tests" : [ ] +} +---- + +== https://github.com/neo4j/graphql/issues/5887 list relationship + +=== Setup + +.Schema +[source,graphql,schema=true] +---- +type House @node { + address: String! + animals: [Animal!]! @relationship(type: "LIVES_IN", direction: IN) +} + +interface Animal { + name: String! +} + +type Dog implements Animal @node { + name: String! +} + +type Cat implements Animal @node { + name: String! +} +---- + +=== should return relationship when first interface match + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Dog {name: "Roxy"})-[:LIVES_IN]->(h:House {address: "Toulouse"}) + CREATE (:Cat {name: "Nala"})-[:LIVES_IN]->(h) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + houses(where: {animals_SOME: {name_EQ: "Roxy"}}) { + address + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Roxy", + "param1" : "Roxy" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:House) +WHERE (EXISTS { + MATCH (this0:Cat)-[:LIVES_IN]->(this) + WHERE this0.name = $param0 + } + OR EXISTS { + MATCH (this1:Dog)-[:LIVES_IN]->(this) + WHERE this1.name = $param1 + }) +RETURN this { + .address +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "houses" : [ { + "address" : "Toulouse" + } ] +} +---- + +=== should return relationship when second interface match + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Dog {name: "Roxy"})-[:LIVES_IN]->(h:House {address: "Toulouse"}) + CREATE (:Cat {name: "Nala"})-[:LIVES_IN]->(h) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + houses(where: {animals_SOME: {name_EQ: "Nala"}}) { + address + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Nala", + "param1" : "Nala" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:House) +WHERE (EXISTS { + MATCH (this0:Cat)-[:LIVES_IN]->(this) + WHERE this0.name = $param0 + } + OR EXISTS { + MATCH (this1:Dog)-[:LIVES_IN]->(this) + WHERE this1.name = $param1 + }) +RETURN this { + .address +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "houses" : [ { + "address" : "Toulouse" + } ] +} +---- + +=== should not return relationship when no interface match + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Dog {name: "Roxy"})-[:LIVES_IN]->(h:House {address: "Toulouse"}) + CREATE (:Cat {name: "Nala"})-[:LIVES_IN]->(h) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + houses(where: {animals_SOME: {name_EQ: "Other"}}) { + address + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Other", + "param1" : "Other" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:House) +WHERE (EXISTS { + MATCH (this0:Cat)-[:LIVES_IN]->(this) + WHERE this0.name = $param0 + } + OR EXISTS { + MATCH (this1:Dog)-[:LIVES_IN]->(this) + WHERE this1.name = $param1 + }) +RETURN this { + .address +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "houses" : [ ] +} +---- diff --git a/core/src/test/resources/integration-test-files/issues/5887.js.adoc b/core/src/test/resources/integration-test-files/issues/5887.js.adoc new file mode 100644 index 00000000..f2f7d8b2 --- /dev/null +++ b/core/src/test/resources/integration-test-files/issues/5887.js.adoc @@ -0,0 +1,409 @@ +// This file was generated by the Test-Case extractor of neo4j-graphql +:toc: +:toclevels: 42 + +== https://github.com/neo4j/graphql/issues/5887 + +=== Setup + +.Schema +[source,graphql,schema=true] +---- +interface Base { + id: ID! +} + +type A implements Base @node { + id: ID! +} + +type B implements Base @node { + id: ID! +} + +type Test { + base: Base! @relationship(type: "HAS", direction: OUT) +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Test)-[:HAS]->(:A {id: "1"}) + CREATE (:Test)-[:HAS]->(:B {id: "2"}) +---- + +=== should return relationship when first interface matches + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + tests(where: {base: {id: "1"}}) { + base { + id + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "1", + "param1": "1" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Test) +OPTIONAL MATCH (this)-[:HAS]->(this0:A) +WITH *, count(this0) AS var1 +OPTIONAL MATCH (this)-[:HAS]->(this2:B) +WITH *, count(this2) AS var3 +WITH * +WHERE ((var1 <> 0 AND this0.id = $param0) OR (var3 <> 0 AND this2.id = $param1)) +CALL { + WITH this + CALL { + WITH * + MATCH (this)-[this4:HAS]->(this5:A) + WITH this5 { .id, __typename: "A", __id: toString(id(this5)) } AS this5 + RETURN this5 AS var6 + UNION + WITH * + MATCH (this)-[this7:HAS]->(this8:B) + WITH this8 { .id, __typename: "B", __id: toString(id(this8)) } AS this8 + RETURN this8 AS var6 + } + WITH var6 + RETURN head(collect(var6)) AS var6 +} +RETURN this { base: var6 } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "tests": [ + { + "base": { + "id": "1" + } + } + ] +} +---- + +=== should return relationship when second interface matches + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + tests(where: {base: {id: "2"}}) { + base { + id + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "2", + "param1": "2" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Test) +OPTIONAL MATCH (this)-[:HAS]->(this0:A) +WITH *, count(this0) AS var1 +OPTIONAL MATCH (this)-[:HAS]->(this2:B) +WITH *, count(this2) AS var3 +WITH * +WHERE ((var1 <> 0 AND this0.id = $param0) OR (var3 <> 0 AND this2.id = $param1)) +CALL { + WITH this + CALL { + WITH * + MATCH (this)-[this4:HAS]->(this5:A) + WITH this5 { .id, __typename: "A", __id: toString(id(this5)) } AS this5 + RETURN this5 AS var6 + UNION + WITH * + MATCH (this)-[this7:HAS]->(this8:B) + WITH this8 { .id, __typename: "B", __id: toString(id(this8)) } AS this8 + RETURN this8 AS var6 + } + WITH var6 + RETURN head(collect(var6)) AS var6 +} +RETURN this { base: var6 } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "tests": [ + { + "base": { + "id": "2" + } + } + ] +} +---- + +=== should not return relationship when no interface match + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + tests(where: {base: {id: "x"}}) { + base { + id + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "x", + "param1": "x" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Test) +OPTIONAL MATCH (this)-[:HAS]->(this0:A) +WITH *, count(this0) AS var1 +OPTIONAL MATCH (this)-[:HAS]->(this2:B) +WITH *, count(this2) AS var3 +WITH * +WHERE ((var1 <> 0 AND this0.id = $param0) OR (var3 <> 0 AND this2.id = $param1)) +CALL { + WITH this + CALL { + WITH * + MATCH (this)-[this4:HAS]->(this5:A) + WITH this5 { .id, __typename: "A", __id: toString(id(this5)) } AS this5 + RETURN this5 AS var6 + UNION + WITH * + MATCH (this)-[this7:HAS]->(this8:B) + WITH this8 { .id, __typename: "B", __id: toString(id(this8)) } AS this8 + RETURN this8 AS var6 + } + WITH var6 + RETURN head(collect(var6)) AS var6 +} +RETURN this { base: var6 } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "tests": [] +} +---- + +== https://github.com/neo4j/graphql/issues/5887 list relationship + +=== Setup + +.Schema +[source,graphql,schema=true] +---- +type House { + address: String! + animals: [Animal!]! @relationship(type: "LIVES_IN", direction: IN) +} + +interface Animal { + name: String! +} + +type Dog implements Animal @node { + name: String! +} + +type Cat implements Animal @node { + name: String! +} +---- + +=== should return relationship when first interface match + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Dog {name: "Roxy"})-[:LIVES_IN]->(h:House {address: "Toulouse"}) + CREATE (:Cat {name: "Nala"})-[:LIVES_IN]->(h) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + houses(where: {animals_SOME: {name_EQ: "Roxy"}}) { + address + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Roxy", + "param1": "Roxy" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:House) +WHERE (EXISTS { + MATCH (this)<-[:LIVES_IN]-(this0:Cat) + WHERE this0.name = $param0 +} OR EXISTS { + MATCH (this)<-[:LIVES_IN]-(this1:Dog) + WHERE this1.name = $param1 +}) +RETURN this { .address } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "houses": [ + { + "address": "Toulouse" + } + ] +} +---- + +=== should return relationship when second interface match + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Dog {name: "Roxy"})-[:LIVES_IN]->(h:House {address: "Toulouse"}) + CREATE (:Cat {name: "Nala"})-[:LIVES_IN]->(h) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + houses(where: {animals_SOME: {name_EQ: "Nala"}}) { + address + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Nala", + "param1": "Nala" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:House) +WHERE (EXISTS { + MATCH (this)<-[:LIVES_IN]-(this0:Cat) + WHERE this0.name = $param0 +} OR EXISTS { + MATCH (this)<-[:LIVES_IN]-(this1:Dog) + WHERE this1.name = $param1 +}) +RETURN this { .address } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "houses": [ + { + "address": "Toulouse" + } + ] +} +---- + +=== should not return relationship when no interface match + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Dog {name: "Roxy"})-[:LIVES_IN]->(h:House {address: "Toulouse"}) + CREATE (:Cat {name: "Nala"})-[:LIVES_IN]->(h) +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + houses(where: {animals_SOME: {name_EQ: "Other"}}) { + address + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Other", + "param1": "Other" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:House) +WHERE (EXISTS { + MATCH (this)<-[:LIVES_IN]-(this0:Cat) + WHERE this0.name = $param0 +} OR EXISTS { + MATCH (this)<-[:LIVES_IN]-(this1:Dog) + WHERE this1.name = $param1 +}) +RETURN this { .address } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "houses": [] +} +---- diff --git a/core/src/test/resources/integration-test-files/issues/620.adoc b/core/src/test/resources/integration-test-files/issues/620.adoc index 24664fe7..398137f1 100644 --- a/core/src/test/resources/integration-test-files/issues/620.adoc +++ b/core/src/test/resources/integration-test-files/issues/620.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type User { +type User @node { id: String name: String } -type Business { +type Business @node { id: String name: String } @@ -32,11 +32,11 @@ CREATE (u:User {id: "1234", name: "arthur"}) [source,graphql,request=true] ---- { - users(where: {id: "1234"}) { + users(where: {id_EQ: "1234"}) { id name } - businesses(where: {id: "1234"}) { + businesses(where: {id_EQ: "1234"}) { id name } diff --git a/core/src/test/resources/integration-test-files/issues/620.js.adoc b/core/src/test/resources/integration-test-files/issues/620.js.adoc index 08c5557e..d7c30603 100644 --- a/core/src/test/resources/integration-test-files/issues/620.js.adoc +++ b/core/src/test/resources/integration-test-files/issues/620.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type User { +type User @node { id: String name: String } -type Business { +type Business @node { id: String name: String } @@ -33,11 +33,11 @@ CREATE (u:User {id: "1234", name: "arthur"}) [source,graphql,request=true] ---- { - users(where: {id: "1234"}) { + users(where: {id_EQ: "1234"}) { id name } - businesses(where: {id: "1234"}) { + businesses(where: {id_EQ: "1234"}) { id name } diff --git a/core/src/test/resources/integration-test-files/issues/988.adoc b/core/src/test/resources/integration-test-files/issues/988.adoc new file mode 100644 index 00000000..c2dce9cd --- /dev/null +++ b/core/src/test/resources/integration-test-files/issues/988.adoc @@ -0,0 +1,264 @@ +:toc: +:toclevels: 42 + += https://github.com/neo4j/graphql/issues/988 + +== Setup + +.Schema +[source,graphql,schema=true] +---- +type Series @node { + name: String + current: Boolean! + manufacturer: [Manufacturer!]! @relationship(type: "MANUFACTURER", properties: "RelationProps", direction: OUT) + brand: [Brand!]! @relationship(type: "BRAND", properties: "RelationProps", direction: OUT) +} + +type Brand @node { + name: String + current: Boolean! +} + +type Manufacturer @node { + name: String + current: Boolean! +} + +type RelationProps @relationshipProperties { + current: Boolean! +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Manufacturer {name: "C", id: "a"})<-[:MANUFACTURER {current: true}]-(:Series {name: "123", current: true})-[:BRAND {current: true}]->(:Brand {name: "smart"})<-[:BRAND {current: true}]-(:Series {name: "456", current: true})-[:MANUFACTURER {current: false}]->(:Manufacturer {name: "AM"}) +---- + +== should query nested connection + +.GraphQL-Query +[source,graphql,request=true] +---- +query getSeriesWithRelationFilters($where: SeriesWhere = {current: true}) { + series(where: $where) { + name + current + manufacturerConnection { + edges { + properties { + current + } + node { + name + } + } + } + brandConnection { + edges { + properties { + current + } + node { + name + } + } + } + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "where" : { + "current_EQ" : true, + "AND" : [ { + "OR" : [ { + "manufacturerConnection_SOME" : { + "edge" : { + "current_EQ" : true + }, + "node" : { + "name_EQ" : "C" + } + } + }, { + "manufacturerConnection_SOME" : { + "edge" : { + "current_EQ" : false + }, + "node" : { + "name_EQ" : "AM" + } + } + } ] + }, { + "OR" : [ { + "brandConnection_SOME" : { + "edge" : { + "current_EQ" : true + }, + "node" : { + "name_EQ" : "smart" + } + } + } ] + } ] + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "C", + "param1" : true, + "param2" : "AM", + "param3" : false, + "param4" : "smart", + "param5" : true, + "param6" : true +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Series) +WHERE ((EXISTS { + MATCH (this)-[edge0:MANUFACTURER]->(this0:Manufacturer) + WHERE (this0.name = $param0 + AND edge0.current = $param1) + } + OR EXISTS { + MATCH (this)-[edge1:MANUFACTURER]->(this1:Manufacturer) + WHERE (this1.name = $param2 + AND edge1.current = $param3) + }) + AND EXISTS { + MATCH (this)-[edge2:BRAND]->(this2:Brand) + WHERE (this2.name = $param4 + AND edge2.current = $param5) + } + AND this.current = $param6) +CALL { + WITH this + MATCH (this)-[manufacturer1:MANUFACTURER]->(manufacturer0:Manufacturer) + WITH collect( { + node: manufacturer0, + relationship: manufacturer1 + }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS manufacturer0, edge.relationship AS manufacturer1 + RETURN collect( { + properties: { + __typename: 'RelationProps', + current: manufacturer1.current + }, + node: { + __typename: 'Manufacturer', + name: manufacturer0.name + } + }) AS manufacturerConnectionEdges + } + RETURN { + edges: manufacturerConnectionEdges, + totalCount: totalCount + } AS manufacturerConnection +} +CALL { + WITH this + MATCH (this)-[brand1:BRAND]->(brand0:Brand) + WITH collect( { + node: brand0, + relationship: brand1 + }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS brand0, edge.relationship AS brand1 + RETURN collect( { + properties: { + __typename: 'RelationProps', + current: brand1.current + }, + node: { + __typename: 'Brand', + name: brand0.name + } + }) AS brandConnectionEdges + } + RETURN { + edges: brandConnectionEdges, + totalCount: totalCount + } AS brandConnection +} +RETURN this { + .name, + .current, + manufacturerConnection: manufacturerConnection, + brandConnection: brandConnection +} AS this +---- + +.GraphQL-Response +[source,json,response=true,ignore-order] +---- +{ + "series" : [ { + "name" : "123", + "current" : true, + "manufacturerConnection" : { + "edges" : [ { + "properties" : { + "current" : true + }, + "node" : { + "name" : "C" + } + } ] + }, + "brandConnection" : { + "edges" : [ { + "properties" : { + "current" : true + }, + "node" : { + "name" : "smart" + } + } ] + } + }, { + "name" : "456", + "current" : true, + "manufacturerConnection" : { + "edges" : [ { + "properties" : { + "current" : false + }, + "node" : { + "name" : "AM" + } + } ] + }, + "brandConnection" : { + "edges" : [ { + "properties" : { + "current" : true + }, + "node" : { + "name" : "smart" + } + } ] + } + } ] +} +---- diff --git a/core/src/test/resources/integration-test-files/issues/988.js.adoc b/core/src/test/resources/integration-test-files/issues/988.js.adoc new file mode 100644 index 00000000..3292bcd1 --- /dev/null +++ b/core/src/test/resources/integration-test-files/issues/988.js.adoc @@ -0,0 +1,243 @@ +// This file was generated by the Test-Case extractor of neo4j-graphql +:toc: +:toclevels: 42 + += https://github.com/neo4j/graphql/issues/988 + +== Setup + +.Schema +[source,graphql,schema=true] +---- +type Series @node { + name: String + current: Boolean! + manufacturer: [Manufacturer!]! @relationship(type: "MANUFACTURER", properties: "RelationProps", direction: OUT) + brand: [Brand!]! @relationship(type: "BRAND", properties: "RelationProps", direction: OUT) +} + +type Brand @node { + name: String + current: Boolean! +} + +type Manufacturer @node { + name: String + current: Boolean! +} + +type RelationProps @relationshipProperties { + current: Boolean! +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (:Manufacturer {name: "C", id: "a"})<-[:MANUFACTURER {current: true}]-(:Series {name: "123", current: true})-[:BRAND {current: true}]->(:Brand {name: "smart"})<-[:BRAND {current: true}]-(:Series {name: "456", current: true})-[:MANUFACTURER {current: false}]->(:Manufacturer {name: "AM"}) +---- + +== should query nested connection + +.GraphQL-Query +[source,graphql,request=true] +---- +query getSeriesWithRelationFilters($where: SeriesWhere = {current: true}) { + series(where: $where) { + name + current + manufacturerConnection { + edges { + properties { + current + } + node { + name + } + } + } + brandConnection { + edges { + properties { + current + } + node { + name + } + } + } + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "where": { + "current_EQ": true, + "AND": [ + { + "OR": [ + { + "manufacturerConnection_SOME": { + "edge": { + "current_EQ": true + }, + "node": { + "name_EQ": "C" + } + } + }, + { + "manufacturerConnection_SOME": { + "edge": { + "current_EQ": false + }, + "node": { + "name_EQ": "AM" + } + } + } + ] + }, + { + "OR": [ + { + "brandConnection_SOME": { + "edge": { + "current_EQ": true + }, + "node": { + "name_EQ": "smart" + } + } + } + ] + } + ] + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": true, + "param1": "C", + "param2": true, + "param3": "AM", + "param4": false, + "param5": "smart", + "param6": true +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Series) +WHERE (this.current = $param0 AND ((EXISTS { + MATCH (this)-[this0:MANUFACTURER]->(this1:Manufacturer) + WHERE (this1.name = $param1 AND this0.current = $param2) +} OR EXISTS { + MATCH (this)-[this2:MANUFACTURER]->(this3:Manufacturer) + WHERE (this3.name = $param3 AND this2.current = $param4) +}) AND EXISTS { + MATCH (this)-[this4:BRAND]->(this5:Brand) + WHERE (this5.name = $param5 AND this4.current = $param6) +})) +CALL { + WITH this + MATCH (this)-[this6:MANUFACTURER]->(this7:Manufacturer) + WITH collect({ node: this7, relationship: this6 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this7, edge.relationship AS this6 + RETURN collect({ properties: { current: this6.current, __typename: "RelationProps" }, node: { name: this7.name, __typename: "Manufacturer" } }) AS var8 + } + RETURN { edges: var8, totalCount: totalCount } AS var9 +} +CALL { + WITH this + MATCH (this)-[this10:BRAND]->(this11:Brand) + WITH collect({ node: this11, relationship: this10 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this11, edge.relationship AS this10 + RETURN collect({ properties: { current: this10.current, __typename: "RelationProps" }, node: { name: this11.name, __typename: "Brand" } }) AS var12 + } + RETURN { edges: var12, totalCount: totalCount } AS var13 +} +RETURN this { .name, .current, manufacturerConnection: var9, brandConnection: var13 } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "series": [ + { + "name": "123", + "current": true, + "manufacturerConnection": { + "edges": [ + { + "properties": { + "current": true + }, + "node": { + "name": "C" + } + } + ] + }, + "brandConnection": { + "edges": [ + { + "properties": { + "current": true + }, + "node": { + "name": "smart" + } + } + ] + } + }, + { + "name": "456", + "current": true, + "manufacturerConnection": { + "edges": [ + { + "properties": { + "current": false + }, + "node": { + "name": "AM" + } + } + ] + }, + "brandConnection": { + "edges": [ + { + "properties": { + "current": true + }, + "node": { + "name": "smart" + } + } + ] + } + } + ] +} +---- diff --git a/core/src/test/resources/integration-test-files/issues/date-in-edge.adoc b/core/src/test/resources/integration-test-files/issues/date-in-edge.adoc index f57e568a..f8bc8139 100644 --- a/core/src/test/resources/integration-test-files/issues/date-in-edge.adoc +++ b/core/src/test/resources/integration-test-files/issues/date-in-edge.adoc @@ -8,17 +8,17 @@ .Schema [source,graphql,schema=true] ---- -type Genre { +type Genre @node { id: ID! movies: [Movie!]! @relationship(type: "MOVIE", direction: OUT) } -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTOR", direction: OUT) } -type Actor { +type Actor @node { name: String! birthday: DateTime! movie: Movie! @relationship(type: "ACTOR", direction: IN) @@ -39,7 +39,7 @@ CREATE (genre:Genre { id: "RandomString1" }) [source,graphql,request=true] ---- { - genres(where: {id: "RandomString1"}) { + genres(where: {id_EQ: "RandomString1"}) { movies { actorsConnection { edges { diff --git a/core/src/test/resources/integration-test-files/issues/date-in-edge.js.adoc b/core/src/test/resources/integration-test-files/issues/date-in-edge.js.adoc index 2e336a78..729658c0 100644 --- a/core/src/test/resources/integration-test-files/issues/date-in-edge.js.adoc +++ b/core/src/test/resources/integration-test-files/issues/date-in-edge.js.adoc @@ -9,17 +9,17 @@ .Schema [source,graphql,schema=true] ---- -type Genre { +type Genre @node { id: ID! movies: [Movie!]! @relationship(type: "MOVIE", direction: OUT) } -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTOR", direction: OUT) } -type Actor { +type Actor @node { name: String! birthday: DateTime! movie: Movie! @relationship(type: "ACTOR", direction: IN) @@ -40,7 +40,7 @@ CREATE (genre:Genre { id: "RandomString1" }) [source,graphql,request=true] ---- { - genres(where: {id: "RandomString1"}) { + genres(where: {id_EQ: "RandomString1"}) { movies { actorsConnection { edges { diff --git a/core/src/test/resources/integration-test-files/issues/escape-in-union.adoc b/core/src/test/resources/integration-test-files/issues/escape-in-union.adoc new file mode 100644 index 00000000..d0c7769f --- /dev/null +++ b/core/src/test/resources/integration-test-files/issues/escape-in-union.adoc @@ -0,0 +1,99 @@ +:toc: +:toclevels: 42 + += Empty fields on unions due to escaped labels + +== Setup + +.Schema +[source,graphql,schema=true] +---- +union Content = Blog | Post + +type Blog @node(labels: ["Blog"]) { + title: String + posts: [Post!]! @relationship(type: "HAS_POST", direction: OUT) +} + +type Post @node(labels: ["Post"]) { + content: String +} + +type User @node(labels: ["User"]) { + name: String + content: [Content!]! @relationship(type: "HAS_CONTENT", direction: OUT) +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (u:User {name: "dan"}) + CREATE (b:Blog {title:"my cool blog"}) + CREATE (p:Post {content: "my cool post"}) + + MERGE(u)-[:HAS_CONTENT]->(b) + MERGE(b)-[:HAS_POST]->(p) +---- + +== should return users and unions + +.GraphQL-Query +[source,graphql,request=true] +---- +query GetUsersWithAllContent { + users { + name + content(where: {Blog: {NOT: {title_EQ: null}}}) { + ... on Blog { + title + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ } +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:User) +CALL { + WITH this + CALL { + WITH * + MATCH (this)-[hasContent0:HAS_CONTENT]->(blog0:Blog) + WHERE blog0.title IS NOT NULL + WITH blog0 { + __typename: 'Blog', + __id: elementId(blog0), + .title + } AS blog0 + RETURN blog0 AS content0 + } + WITH content0 + RETURN collect(content0) AS content0 +} +RETURN this { + .name, + content: content0 +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "users" : [ { + "name" : "dan", + "content" : [ { + "title" : "my cool blog" + } ] + } ] +} +---- diff --git a/core/src/test/resources/integration-test-files/issues/escape-in-union.js.adoc b/core/src/test/resources/integration-test-files/issues/escape-in-union.js.adoc new file mode 100644 index 00000000..b7eb6518 --- /dev/null +++ b/core/src/test/resources/integration-test-files/issues/escape-in-union.js.adoc @@ -0,0 +1,97 @@ +// This file was generated by the Test-Case extractor of neo4j-graphql +:toc: +:toclevels: 42 + += Empty fields on unions due to escaped labels + +== Setup + +.Schema +[source,graphql,schema=true] +---- +union Content = Blog | Post + +type Blog @node(labels: ["Blog"]) { + title: String + posts: [Post!]! @relationship(type: "HAS_POST", direction: OUT) +} + +type Post @node(labels: ["Post"]) { + content: String +} + +type User @node(labels: ["User"]) { + name: String + content: [Content!]! @relationship(type: "HAS_CONTENT", direction: OUT) +} +---- + +.Test Data +[source,cypher,test-data=true] +---- +CREATE (u:User {name: "dan"}) + CREATE (b:Blog {title:"my cool blog"}) + CREATE (p:Post {content: "my cool post"}) + + MERGE(u)-[:HAS_CONTENT]->(b) + MERGE(b)-[:HAS_POST]->(p) +---- + +== should return users and unions + +.GraphQL-Query +[source,graphql,request=true] +---- +query GetUsersWithAllContent { + users { + name + content(where: {Blog: {NOT: {title_EQ: null}}}) { + ... on Blog { + title + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:User) +CALL { + WITH this + CALL { + WITH * + MATCH (this)-[this0:HAS_CONTENT]->(this1:Blog) + WHERE NOT (this1.title IS NULL) + WITH this1 { .title, __typename: "Blog", __id: toString(id(this1)) } AS this1 + RETURN this1 AS var2 + } + WITH var2 + RETURN collect(var2) AS var2 +} +RETURN this { .name, content: var2 } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "users": [ + { + "name": "dan", + "content": [ + { + "title": "my cool blog" + } + ] + } + ] +} +---- diff --git a/core/src/test/resources/integration-test-files/issues/label-cypher-injection.adoc b/core/src/test/resources/integration-test-files/issues/label-cypher-injection.adoc new file mode 100644 index 00000000..ec9278de --- /dev/null +++ b/core/src/test/resources/integration-test-files/issues/label-cypher-injection.adoc @@ -0,0 +1,102 @@ +:toc: +:toclevels: 42 + += Label cypher injection + +== should escape the label name passed in context + +.Schema +[source,graphql,schema=true] +---- +type Movie @node(labels: ["$context.label"]) { + title: String +} +---- + +.Query Context +[source,json,query-config=true] +---- +{ + "contextParams" : { + "label" : "Movie\\u0060) MATCH" + } +} +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies { + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ } +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:`Movie``) MATCH`) +RETURN this { + .title +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies" : [ ] +} +---- + +== should escape the label name passed through jwt + +CAUTION: This functionality is not yet implemented + +.Schema +[source,graphql,schema=true] +---- +type Movie @node(labels: ["$jwt.label"]) { + title: String +} +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies { + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ } +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:`Movie``) MATCH`) +RETURN this { + .title +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies" : [ ] +} +---- diff --git a/core/src/test/resources/integration-test-files/issues/label-cypher-injection.js.adoc b/core/src/test/resources/integration-test-files/issues/label-cypher-injection.js.adoc new file mode 100644 index 00000000..19791f20 --- /dev/null +++ b/core/src/test/resources/integration-test-files/issues/label-cypher-injection.js.adoc @@ -0,0 +1,97 @@ +// This file was generated by the Test-Case extractor of neo4j-graphql +:toc: +:toclevels: 42 + += Label cypher injection + +== should escape the label name passed in context + +.Schema +[source,graphql,schema=true] +---- +type Movie @node(labels: ["$context.label"]) { + title: String +} +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies { + title + } +} +---- + +.Query Context +[source,json,query-config=true] +---- +{ + "contextParams": { + "label": "Movie\\u0060) MATCH" + } +} +---- + +.Expected Cypher params +[source,json] +---- +{} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:`Movie``) MATCH`) +RETURN this { .title } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [] +} +---- + +== should escape the label name passed through jwt + +.Schema +[source,graphql,schema=true] +---- +type Movie @node(labels: ["$jwt.label"]) { + title: String +} +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies { + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:`Movie``) MATCH`) +RETURN this { .title } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "movies": [] +} +---- diff --git a/core/src/test/resources/integration-test-files/relationship-properties/read.adoc b/core/src/test/resources/integration-test-files/relationship-properties/read.adoc index 22137f05..fbe4f6e5 100644 --- a/core/src/test/resources/integration-test-files/relationship-properties/read.adoc +++ b/core/src/test/resources/integration-test-files/relationship-properties/read.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } @@ -37,7 +37,7 @@ CREATE (:Actor { name: 'aRandomString2' })-[:ACTED_IN { screenTime: 105 }]->(m:M [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { title actorsConnection { totalCount diff --git a/core/src/test/resources/integration-test-files/relationship-properties/read.js.adoc b/core/src/test/resources/integration-test-files/relationship-properties/read.js.adoc index 2dd38dc6..5ba03939 100644 --- a/core/src/test/resources/integration-test-files/relationship-properties/read.js.adoc +++ b/core/src/test/resources/integration-test-files/relationship-properties/read.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } @@ -38,7 +38,7 @@ CREATE (:Actor { name: 'aRandomString2' })-[:ACTED_IN { screenTime: 105 }]->(m:M [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { title actorsConnection { totalCount diff --git a/core/src/test/resources/integration-test-files/rfcs/query-limits.adoc b/core/src/test/resources/integration-test-files/rfcs/query-limits.adoc index b98a372f..f6e41b4d 100644 --- a/core/src/test/resources/integration-test-files/rfcs/query-limits.adoc +++ b/core/src/test/resources/integration-test-files/rfcs/query-limits.adoc @@ -10,7 +10,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie @limit(default: 2) { +type Movie @limit(default: 2) @node { id: ID! } ---- diff --git a/core/src/test/resources/integration-test-files/rfcs/query-limits.js.adoc b/core/src/test/resources/integration-test-files/rfcs/query-limits.js.adoc index 9b9d5b66..f449c057 100644 --- a/core/src/test/resources/integration-test-files/rfcs/query-limits.js.adoc +++ b/core/src/test/resources/integration-test-files/rfcs/query-limits.js.adoc @@ -11,7 +11,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie @limit(default: 2) { +type Movie @limit(default: 2) @node { id: ID! } ---- diff --git a/core/src/test/resources/integration-test-files/root-connections.adoc b/core/src/test/resources/integration-test-files/root-connections.adoc new file mode 100644 index 00000000..471de3ba --- /dev/null +++ b/core/src/test/resources/integration-test-files/root-connections.adoc @@ -0,0 +1,81 @@ +:toc: +:toclevels: 42 + += root-connections + +== Setup + +.Schema +[source,graphql,schema=true] +---- +type Pilot @node { + name: String + aircraft: [Aircraft!]! @relationship(type: "FLIES_IN", direction: IN) +} + +type Aircraft @node { + id: ID! + name: String! + pilots: [Pilot!]! @relationship(type: "FLIES_IN", direction: OUT) +} +---- + +== should return an empty array of edges and a totalCount of zero when there are no records + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + aircraftConnection { + totalCount + edges { + cursor + node { + id + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ } +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Aircraft) +WITH collect( { + node: this +}) AS edges +WITH edges, size(edges) AS totalCount +CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this + RETURN collect( { + node: { + __typename: 'Aircraft', + id: this.id + } + }) AS edges0 +} +RETURN { + edges: edges0, + totalCount: totalCount +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "aircraftConnection" : { + "totalCount" : 0, + "edges" : [ ] + } +} +---- diff --git a/core/src/test/resources/integration-test-files/root-connections.js.adoc b/core/src/test/resources/integration-test-files/root-connections.js.adoc new file mode 100644 index 00000000..8c69153b --- /dev/null +++ b/core/src/test/resources/integration-test-files/root-connections.js.adoc @@ -0,0 +1,72 @@ +// This file was generated by the Test-Case extractor of neo4j-graphql +:toc: +:toclevels: 42 + += root-connections + +== Setup + +.Schema +[source,graphql,schema=true] +---- +type Pilot @node { + name: String + aircraft: [Aircraft!]! @relationship(type: "FLIES_IN", direction: IN) +} + +type Aircraft @node { + id: ID! + name: String! + pilots: [Pilot!]! @relationship(type: "FLIES_IN", direction: OUT) +} +---- + +== should return an empty array of edges and a totalCount of zero when there are no records + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + aircraftConnection { + totalCount + edges { + cursor + node { + id + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this0:Aircraft) +WITH collect({ node: this0 }) AS edges +WITH edges, size(edges) AS totalCount +CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this0 + RETURN collect({ node: { id: this0.id, __typename: "Aircraft" } }) AS var1 +} +RETURN { edges: var1, totalCount: totalCount } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "aircraftConnection": { + "totalCount": 0, + "edges": [] + } +} +---- diff --git a/core/src/test/resources/integration-test-files/scalars.adoc b/core/src/test/resources/integration-test-files/scalars.adoc index b983708e..e0993dd1 100644 --- a/core/src/test/resources/integration-test-files/scalars.adoc +++ b/core/src/test/resources/integration-test-files/scalars.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID } ---- @@ -24,7 +24,7 @@ CREATE (m:Movie {id: "42"}) [source,graphql,request=true] ---- { - movies(where: {id: 42}) { + movies(where: {id_EQ: 42}) { id } } diff --git a/core/src/test/resources/integration-test-files/scalars.js.adoc b/core/src/test/resources/integration-test-files/scalars.js.adoc index f40f7cd8..ea215a78 100644 --- a/core/src/test/resources/integration-test-files/scalars.js.adoc +++ b/core/src/test/resources/integration-test-files/scalars.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID } ---- @@ -25,7 +25,7 @@ CREATE (m:Movie {id: "42"}) [source,graphql,request=true] ---- { - movies(where: {id: 42}) { + movies(where: {id_EQ: 42}) { id } } diff --git a/core/src/test/resources/integration-test-files/types/bigint.adoc b/core/src/test/resources/integration-test-files/types/bigint.adoc index 0bb0b03a..bf3004bc 100644 --- a/core/src/test/resources/integration-test-files/types/bigint.adoc +++ b/core/src/test/resources/integration-test-files/types/bigint.adoc @@ -10,7 +10,7 @@ .Schema [source,graphql,schema=true] ---- -type File { +type File @node { name: String! size: BigInt! } @@ -30,7 +30,7 @@ CREATE (f:File) [source,graphql,request=true] ---- { - files(where: {name: "RandomString1"}) { + files(where: {name_EQ: "RandomString1"}) { name size } @@ -81,7 +81,7 @@ CREATE (f:File) [source,graphql,request=true] ---- { - files(where: {size: 8323372036854775807}) { + files(where: {size_EQ: 8323372036854775807}) { name size } diff --git a/core/src/test/resources/integration-test-files/types/bigint.js.adoc b/core/src/test/resources/integration-test-files/types/bigint.js.adoc index adca7214..bdef5367 100644 --- a/core/src/test/resources/integration-test-files/types/bigint.js.adoc +++ b/core/src/test/resources/integration-test-files/types/bigint.js.adoc @@ -11,7 +11,7 @@ .Schema [source,graphql,schema=true] ---- -type File { +type File @node { name: String! size: BigInt! } @@ -31,7 +31,7 @@ CREATE (f:File) [source,graphql,request=true] ---- { - files(where: {name: "RandomString1"}) { + files(where: {name_EQ: "RandomString1"}) { name size } @@ -81,7 +81,7 @@ CREATE (f:File) [source,graphql,request=true] ---- { - files(where: {size: 8323372036854775807}) { + files(where: {size_EQ: 8323372036854775807}) { name size } diff --git a/core/src/test/resources/integration-test-files/types/date.adoc b/core/src/test/resources/integration-test-files/types/date.adoc index 83eb6380..bf5eb39a 100644 --- a/core/src/test/resources/integration-test-files/types/date.adoc +++ b/core/src/test/resources/integration-test-files/types/date.adoc @@ -10,7 +10,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { date: Date } ---- @@ -26,7 +26,7 @@ CREATE (m:Movie) [source,graphql,request=true] ---- { - movies(where: {date: "2024-12-24T18:00:00.000Z"}) { + movies(where: {date_EQ: "2024-12-24T18:00:00.000Z"}) { date } } diff --git a/core/src/test/resources/integration-test-files/types/date.js.adoc b/core/src/test/resources/integration-test-files/types/date.js.adoc index 2f99155f..e4dbe6b0 100644 --- a/core/src/test/resources/integration-test-files/types/date.js.adoc +++ b/core/src/test/resources/integration-test-files/types/date.js.adoc @@ -11,7 +11,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { date: Date } ---- @@ -27,7 +27,7 @@ CREATE (m:Movie) [source,graphql,request=true] ---- { - movies(where: {date: "2024-12-24T18:00:00.000Z"}) { + movies(where: {date_EQ: "2024-12-24T18:00:00.000Z"}) { date } } diff --git a/core/src/test/resources/integration-test-files/types/datetime.adoc b/core/src/test/resources/integration-test-files/types/datetime.adoc index df3abb35..d7a95d94 100644 --- a/core/src/test/resources/integration-test-files/types/datetime.adoc +++ b/core/src/test/resources/integration-test-files/types/datetime.adoc @@ -10,7 +10,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { datetime: DateTime } ---- @@ -26,7 +26,7 @@ CREATE (m:Movie) [source,graphql,request=true] ---- { - movies(where: {datetime: "2024-12-24T18:42:24.123Z"}) { + movies(where: {datetime_EQ: "2024-12-24T18:42:24.123Z"}) { datetime } } @@ -65,7 +65,7 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { name: String datetime: DateTime } @@ -83,7 +83,7 @@ CREATE (m:Movie) [source,graphql,request=true] ---- { - movies(where: {name: "Movie"}) { + movies(where: {name_EQ: "Movie"}) { datetime } } diff --git a/core/src/test/resources/integration-test-files/types/datetime.js.adoc b/core/src/test/resources/integration-test-files/types/datetime.js.adoc index 1a5444d1..d3580af3 100644 --- a/core/src/test/resources/integration-test-files/types/datetime.js.adoc +++ b/core/src/test/resources/integration-test-files/types/datetime.js.adoc @@ -11,7 +11,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { datetime: DateTime } ---- @@ -27,7 +27,7 @@ CREATE (m:Movie) [source,graphql,request=true] ---- { - movies(where: {datetime: "2024-12-24T18:42:24.123Z"}) { + movies(where: {datetime_EQ: "2024-12-24T18:42:24.123Z"}) { datetime } } @@ -66,7 +66,7 @@ RETURN this { datetime: apoc.date.convertFormat(toString(this.datetime), "iso_zo .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { name: String datetime: DateTime } @@ -84,7 +84,7 @@ CREATE (m:Movie) [source,graphql,request=true] ---- { - movies(where: {name: "Movie"}) { + movies(where: {name_EQ: "Movie"}) { datetime } } diff --git a/core/src/test/resources/integration-test-files/types/duration.adoc b/core/src/test/resources/integration-test-files/types/duration.adoc index 4b7d2dd8..c3b0491e 100644 --- a/core/src/test/resources/integration-test-files/types/duration.adoc +++ b/core/src/test/resources/integration-test-files/types/duration.adoc @@ -10,7 +10,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID! duration: Duration! } @@ -29,7 +29,7 @@ CREATE (movie:Movie) [source,graphql,request=true] ---- query ($id: ID!, $duration: Duration!) { - movies(where: {id: $id, duration: $duration}) { + movies(where: {id_EQ: $id, duration_EQ: $duration}) { id duration } @@ -94,7 +94,7 @@ CREATE (long:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{duration: ASC}]}) { + movies(where: $where, sort: [{duration: ASC}]) { id duration } @@ -162,7 +162,7 @@ CREATE (long:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{duration: ASC}]}) { + movies(where: $where, sort: [{duration: ASC}]) { id duration } @@ -233,7 +233,7 @@ CREATE (long:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{duration: ASC}]}) { + movies(where: $where, sort: [{duration: ASC}]) { id duration } @@ -301,7 +301,7 @@ CREATE (long:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{duration: ASC}]}) { + movies(where: $where, sort: [{duration: ASC}]) { id duration } diff --git a/core/src/test/resources/integration-test-files/types/duration.js.adoc b/core/src/test/resources/integration-test-files/types/duration.js.adoc index dd7c8e46..17aaa43d 100644 --- a/core/src/test/resources/integration-test-files/types/duration.js.adoc +++ b/core/src/test/resources/integration-test-files/types/duration.js.adoc @@ -11,7 +11,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID! duration: Duration! } @@ -30,7 +30,7 @@ CREATE (movie:Movie) [source,graphql,request=true] ---- query ($id: ID!, $duration: Duration!) { - movies(where: {id: $id, duration: $duration}) { + movies(where: {id_EQ: $id, duration_EQ: $duration}) { id duration } @@ -93,7 +93,7 @@ CREATE (long:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{duration: ASC}]}) { + movies(where: $where, sort: [{duration: ASC}]) { id duration } @@ -168,7 +168,7 @@ CREATE (long:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{duration: ASC}]}) { + movies(where: $where, sort: [{duration: ASC}]) { id duration } @@ -247,7 +247,7 @@ CREATE (long:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{duration: ASC}]}) { + movies(where: $where, sort: [{duration: ASC}]) { id duration } @@ -322,7 +322,7 @@ CREATE (long:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{duration: ASC}]}) { + movies(where: $where, sort: [{duration: ASC}]) { id duration } diff --git a/core/src/test/resources/integration-test-files/types/localdatetime.adoc b/core/src/test/resources/integration-test-files/types/localdatetime.adoc index 1668ab22..d9dffd6f 100644 --- a/core/src/test/resources/integration-test-files/types/localdatetime.adoc +++ b/core/src/test/resources/integration-test-files/types/localdatetime.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID! localDT: LocalDateTime localDTs: [LocalDateTime!] @@ -30,7 +30,7 @@ CREATE (movie:Movie) [source,graphql,request=true] ---- query ($localDT: LocalDateTime!) { - movies(where: {localDT: $localDT}) { + movies(where: {localDT_EQ: $localDT}) { id localDT } @@ -92,7 +92,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{localDT: ASC}]}) { + movies(where: $where, sort: [{localDT: ASC}]) { id localDT } @@ -115,7 +115,7 @@ query ($where: MovieWhere!) { ---- { "param0" : [ "RandomString1", "RandomString2", "RandomString3" ], - "param1" : "2024-12-24T18:42:24.123000000" + "param1" : "2024-12-24T18:42:24.123" } ---- @@ -160,7 +160,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{localDT: ASC}]}) { + movies(where: $where, sort: [{localDT: ASC}]) { id localDT } @@ -231,7 +231,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{localDT: ASC}]}) { + movies(where: $where, sort: [{localDT: ASC}]) { id localDT } @@ -299,7 +299,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{localDT: ASC}]}) { + movies(where: $where, sort: [{localDT: ASC}]) { id localDT } @@ -374,7 +374,7 @@ CREATE (future:Movie) query ($futureId: ID!, $presentId: ID!, $pastId: ID!, $sort: SortDirection!) { movies( where: {id_IN: [$futureId, $presentId, $pastId]} - options: {sort: [{localDT: $sort}]} + sort: [{localDT: $sort}] ) { id localDT @@ -449,7 +449,7 @@ CREATE (future:Movie) query ($futureId: ID!, $presentId: ID!, $pastId: ID!, $sort: SortDirection!) { movies( where: {id_IN: [$futureId, $presentId, $pastId]} - options: {sort: [{localDT: $sort}]} + sort: [{localDT: $sort}] ) { id localDT diff --git a/core/src/test/resources/integration-test-files/types/localdatetime.js.adoc b/core/src/test/resources/integration-test-files/types/localdatetime.js.adoc index 0ac0987a..681b2a61 100644 --- a/core/src/test/resources/integration-test-files/types/localdatetime.js.adoc +++ b/core/src/test/resources/integration-test-files/types/localdatetime.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID! localDT: LocalDateTime localDTs: [LocalDateTime!] @@ -31,7 +31,7 @@ CREATE (movie:Movie) [source,graphql,request=true] ---- query ($localDT: LocalDateTime!) { - movies(where: {localDT: $localDT}) { + movies(where: {localDT_EQ: $localDT}) { id localDT } @@ -92,7 +92,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{localDT: ASC}]}) { + movies(where: $where, sort: [{localDT: ASC}]) { id localDT } @@ -167,7 +167,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{localDT: ASC}]}) { + movies(where: $where, sort: [{localDT: ASC}]) { id localDT } @@ -246,7 +246,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{localDT: ASC}]}) { + movies(where: $where, sort: [{localDT: ASC}]) { id localDT } @@ -321,7 +321,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{localDT: ASC}]}) { + movies(where: $where, sort: [{localDT: ASC}]) { id localDT } @@ -404,7 +404,7 @@ CREATE (future:Movie) query ($futureId: ID!, $presentId: ID!, $pastId: ID!, $sort: SortDirection!) { movies( where: {id_IN: [$futureId, $presentId, $pastId]} - options: {sort: [{localDT: $sort}]} + sort: [{localDT: $sort}] ) { id localDT @@ -485,7 +485,7 @@ CREATE (future:Movie) query ($futureId: ID!, $presentId: ID!, $pastId: ID!, $sort: SortDirection!) { movies( where: {id_IN: [$futureId, $presentId, $pastId]} - options: {sort: [{localDT: $sort}]} + sort: [{localDT: $sort}] ) { id localDT diff --git a/core/src/test/resources/integration-test-files/types/localtime.adoc b/core/src/test/resources/integration-test-files/types/localtime.adoc index 184e7a69..82e9bc29 100644 --- a/core/src/test/resources/integration-test-files/types/localtime.adoc +++ b/core/src/test/resources/integration-test-files/types/localtime.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID! time: LocalTime times: [LocalTime!] @@ -30,7 +30,7 @@ CREATE (movie:Movie) [source,graphql,request=true] ---- query ($time: LocalTime!) { - movies(where: {time: $time}) { + movies(where: {time_EQ: $time}) { id time } @@ -93,7 +93,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{time: ASC}]}) { + movies(where: $where, sort: [{time: ASC}]) { id time } @@ -161,7 +161,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{time: ASC}]}) { + movies(where: $where, sort: [{time: ASC}]) { id time } @@ -232,7 +232,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{time: ASC}]}) { + movies(where: $where, sort: [{time: ASC}]) { id time } @@ -300,7 +300,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{time: ASC}]}) { + movies(where: $where, sort: [{time: ASC}]) { id time } @@ -373,10 +373,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($futureId: ID!, $presentId: ID!, $pastId: ID!, $sort: SortDirection!) { - movies( - where: {id_IN: [$futureId, $presentId, $pastId]} - options: {sort: [{time: $sort}]} - ) { + movies(where: {id_IN: [$futureId, $presentId, $pastId]}, sort: [{time: $sort}]) { id time } @@ -448,10 +445,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($futureId: ID!, $presentId: ID!, $pastId: ID!, $sort: SortDirection!) { - movies( - where: {id_IN: [$futureId, $presentId, $pastId]} - options: {sort: [{time: $sort}]} - ) { + movies(where: {id_IN: [$futureId, $presentId, $pastId]}, sort: [{time: $sort}]) { id time } diff --git a/core/src/test/resources/integration-test-files/types/localtime.js.adoc b/core/src/test/resources/integration-test-files/types/localtime.js.adoc index d37f00a9..ac4154b8 100644 --- a/core/src/test/resources/integration-test-files/types/localtime.js.adoc +++ b/core/src/test/resources/integration-test-files/types/localtime.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID! time: LocalTime times: [LocalTime!] @@ -31,7 +31,7 @@ CREATE (movie:Movie) [source,graphql,request=true] ---- query ($time: LocalTime!) { - movies(where: {time: $time}) { + movies(where: {time_EQ: $time}) { id time } @@ -93,7 +93,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{time: ASC}]}) { + movies(where: $where, sort: [{time: ASC}]) { id time } @@ -168,7 +168,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{time: ASC}]}) { + movies(where: $where, sort: [{time: ASC}]) { id time } @@ -247,7 +247,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{time: ASC}]}) { + movies(where: $where, sort: [{time: ASC}]) { id time } @@ -322,7 +322,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{time: ASC}]}) { + movies(where: $where, sort: [{time: ASC}]) { id time } @@ -403,10 +403,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($futureId: ID!, $presentId: ID!, $pastId: ID!, $sort: SortDirection!) { - movies( - where: {id_IN: [$futureId, $presentId, $pastId]} - options: {sort: [{time: $sort}]} - ) { + movies(where: {id_IN: [$futureId, $presentId, $pastId]}, sort: [{time: $sort}]) { id time } @@ -484,10 +481,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($futureId: ID!, $presentId: ID!, $pastId: ID!, $sort: SortDirection!) { - movies( - where: {id_IN: [$futureId, $presentId, $pastId]} - options: {sort: [{time: $sort}]} - ) { + movies(where: {id_IN: [$futureId, $presentId, $pastId]}, sort: [{time: $sort}]) { id time } diff --git a/core/src/test/resources/integration-test-files/types/point-cartesian.adoc b/core/src/test/resources/integration-test-files/types/point-cartesian.adoc index e7198922..7b2861e5 100644 --- a/core/src/test/resources/integration-test-files/types/point-cartesian.adoc +++ b/core/src/test/resources/integration-test-files/types/point-cartesian.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Part { +type Part @node { serial: String! location: CartesianPoint! } @@ -33,7 +33,7 @@ CALL { [source,graphql,request=true] ---- query Parts($serial: String!) { - parts(where: {serial: $serial}) { + parts(where: {serial_EQ: $serial}) { serial location { x @@ -112,7 +112,7 @@ CALL { [source,graphql,request=true] ---- query Parts($serial: String!) { - parts(where: {serial: $serial}) { + parts(where: {serial_EQ: $serial}) { serial location { x diff --git a/core/src/test/resources/integration-test-files/types/point-cartesian.js.adoc b/core/src/test/resources/integration-test-files/types/point-cartesian.js.adoc index 1049f9f9..5c4b6eaf 100644 --- a/core/src/test/resources/integration-test-files/types/point-cartesian.js.adoc +++ b/core/src/test/resources/integration-test-files/types/point-cartesian.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Part { +type Part @node { serial: String! location: CartesianPoint! } @@ -34,7 +34,7 @@ CALL { [source,graphql,request=true] ---- query Parts($serial: String!) { - parts(where: {serial: $serial}) { + parts(where: {serial_EQ: $serial}) { serial location { x @@ -67,10 +67,7 @@ query Parts($serial: String!) { ---- MATCH (this:Part) WHERE this.serial = $param0 -RETURN this { .serial, location: CASE - WHEN this.location IS NOT NULL THEN { point: this.location, crs: this.location.crs } - ELSE NULL -END } AS this +RETURN this { .serial, .location } AS this ---- .GraphQL-Response @@ -110,7 +107,7 @@ CALL { [source,graphql,request=true] ---- query Parts($serial: String!) { - parts(where: {serial: $serial}) { + parts(where: {serial_EQ: $serial}) { serial location { x @@ -143,10 +140,7 @@ query Parts($serial: String!) { ---- MATCH (this:Part) WHERE this.serial = $param0 -RETURN this { .serial, location: CASE - WHEN this.location IS NOT NULL THEN { point: this.location, crs: this.location.crs } - ELSE NULL -END } AS this +RETURN this { .serial, .location } AS this ---- .GraphQL-Response diff --git a/core/src/test/resources/integration-test-files/types/point.adoc b/core/src/test/resources/integration-test-files/types/point.adoc index 14bcc27f..c507f7cd 100644 --- a/core/src/test/resources/integration-test-files/types/point.adoc +++ b/core/src/test/resources/integration-test-files/types/point.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Photograph { +type Photograph @node { id: String! size: Int! location: Point! @@ -19,6 +19,330 @@ type Query { } ---- +== enables query of a node with a wgs-84 point + +.Test Data +[source,cypher,test-data=true] +---- +CALL { + CREATE (p:Photograph) + SET p.id = "f8a5a58a-7380-4a39-9103-07a2c0528d8e" + SET p.size = 31364 + SET p.location = point({longitude: 62.5196, latitude: -41.1021}) + RETURN p + } + + RETURN p { .id, .size, .location } AS p +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +query Photographs($longitude: Float!, $latitude: Float!) { + photographs(where: {location_EQ: {longitude: $longitude, latitude: $latitude}}) { + id + size + location { + latitude + longitude + height + crs + } + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "latitude" : -41.1021, + "longitude" : 62.5196 +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : { + "longitude" : 62.5196, + "latitude" : -41.1021 + } +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Photograph) +WHERE this.location = point($param0) +RETURN this { + .id, + .size, + location: CASE WHEN this.location IS NOT NULL THEN { + latitude: this.location.latitude, + longitude: this.location.longitude, + height: CASE WHEN this.location.srid = 4979 THEN this.location.height ELSE NULL END, + crs: this.location.crs + } ELSE NULL END +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "photographs" : [ { + "id" : "f8a5a58a-7380-4a39-9103-07a2c0528d8e", + "size" : 31364, + "location" : { + "latitude" : -41.1021, + "longitude" : 62.5196, + "height" : null, + "crs" : "wgs-84" + } + } ] +} +---- + +''' + +.GraphQL-Query +[source,graphql,request=true] +---- +query Photographs($locations: [PointInput!]) { + photographs(where: {location_IN: $locations}) { + id + size + location { + latitude + longitude + height + crs + } + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "locations" : [ { + "longitude" : 62.5196, + "latitude" : -41.1021 + }, { + "longitude" : -156.8208, + "latitude" : 64.9108 + } ] +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : [ { + "longitude" : 62.5196, + "latitude" : -41.1021 + }, { + "longitude" : -156.8208, + "latitude" : 64.9108 + } ] +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Photograph) +WHERE this.location IN [p IN $param0 | point(p)] +RETURN this { + .id, + .size, + location: CASE WHEN this.location IS NOT NULL THEN { + latitude: this.location.latitude, + longitude: this.location.longitude, + height: CASE WHEN this.location.srid = 4979 THEN this.location.height ELSE NULL END, + crs: this.location.crs + } ELSE NULL END +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "photographs" : [ { + "id" : "f8a5a58a-7380-4a39-9103-07a2c0528d8e", + "size" : 31364, + "location" : { + "latitude" : -41.1021, + "longitude" : 62.5196, + "height" : null, + "crs" : "wgs-84" + } + } ] +} +---- + +''' + +.GraphQL-Query +[source,graphql,request=true] +---- +query Photographs($longitude: Float!, $latitude: Float!) { + photographs( + where: {location_LT: {point: {longitude: $longitude, latitude: $latitude}, distance: 1000000}} + ) { + id + size + location { + latitude + longitude + height + crs + } + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "latitude" : -40.1021, + "longitude" : 62.5196 +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : { + "point" : { + "longitude" : 62.5196, + "latitude" : -40.1021 + }, + "distance" : 1000000.0 + } +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Photograph) +WHERE point.distance(this.location, point($param0.point)) < $param0.distance +RETURN this { + .id, + .size, + location: CASE WHEN this.location IS NOT NULL THEN { + latitude: this.location.latitude, + longitude: this.location.longitude, + height: CASE WHEN this.location.srid = 4979 THEN this.location.height ELSE NULL END, + crs: this.location.crs + } ELSE NULL END +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "photographs" : [ { + "id" : "f8a5a58a-7380-4a39-9103-07a2c0528d8e", + "size" : 31364, + "location" : { + "latitude" : -41.1021, + "longitude" : 62.5196, + "height" : null, + "crs" : "wgs-84" + } + } ] +} +---- + +''' + +.GraphQL-Query +[source,graphql,request=true] +---- +query Photographs($longitude: Float!, $latitude: Float!) { + photographs( + where: {location_GT: {point: {longitude: $longitude, latitude: $latitude}, distance: 1}} + ) { + id + size + location { + latitude + longitude + height + crs + } + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "latitude" : -40.1021, + "longitude" : 62.5196 +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : { + "point" : { + "longitude" : 62.5196, + "latitude" : -40.1021 + }, + "distance" : 1.0 + } +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Photograph) +WHERE point.distance(this.location, point($param0.point)) > $param0.distance +RETURN this { + .id, + .size, + location: CASE WHEN this.location IS NOT NULL THEN { + latitude: this.location.latitude, + longitude: this.location.longitude, + height: CASE WHEN this.location.srid = 4979 THEN this.location.height ELSE NULL END, + crs: this.location.crs + } ELSE NULL END +} AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "photographs" : [ { + "id" : "f8a5a58a-7380-4a39-9103-07a2c0528d8e", + "size" : 31364, + "location" : { + "latitude" : -41.1021, + "longitude" : 62.5196, + "height" : null, + "crs" : "wgs-84" + } + } ] +} +---- + == enables query for equality of a node with a wgs-84-3d point .Test Data @@ -40,7 +364,7 @@ CALL { ---- query Photographs($longitude: Float!, $latitude: Float!, $height: Float) { photographs( - where: {location: {longitude: $longitude, latitude: $latitude, height: $height}} + where: {location_EQ: {longitude: $longitude, latitude: $latitude, height: $height}} ) { id size diff --git a/core/src/test/resources/integration-test-files/types/point.js.adoc b/core/src/test/resources/integration-test-files/types/point.js.adoc index 881ad68d..4497c717 100644 --- a/core/src/test/resources/integration-test-files/types/point.js.adoc +++ b/core/src/test/resources/integration-test-files/types/point.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Photograph { +type Photograph @node { id: String! size: Int! location: Point! @@ -20,6 +20,296 @@ type Query { } ---- +== enables query of a node with a wgs-84 point + +.Test Data +[source,cypher,test-data=true] +---- +CALL { + CREATE (p:Photograph) + SET p.id = "f8a5a58a-7380-4a39-9103-07a2c0528d8e" + SET p.size = 31364 + SET p.location = point({longitude: 62.5196, latitude: -41.1021}) + RETURN p + } + + RETURN p { .id, .size, .location } AS p +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +query Photographs($longitude: Float!, $latitude: Float!) { + photographs(where: {location_EQ: {longitude: $longitude, latitude: $latitude}}) { + id + size + location { + latitude + longitude + height + crs + } + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "longitude": 62.5196, + "latitude": -41.1021 +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": { + "longitude": 62.5196, + "latitude": -41.1021 + } +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Photograph) +WHERE this.location = point($param0) +RETURN this { .id, .size, .location } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "photographs": [ + { + "id": "f8a5a58a-7380-4a39-9103-07a2c0528d8e", + "size": 31364, + "location": { + "latitude": -41.1021, + "longitude": 62.5196, + "height": null, + "crs": "wgs-84" + } + } + ] +} +---- + +''' + +.GraphQL-Query +[source,graphql,request=true] +---- +query Photographs($locations: [PointInput!]) { + photographs(where: {location_IN: $locations}) { + id + size + location { + latitude + longitude + height + crs + } + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "locations": [ + { + "longitude": 62.5196, + "latitude": -41.1021 + }, + { + "longitude": -156.8208, + "latitude": 64.9108 + } + ] +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": { + "longitude": 62.5196, + "latitude": -41.1021 + } +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Photograph) +WHERE this.location = point($param0) +RETURN this { .id, .size, .location } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "photographs": [ + { + "id": "f8a5a58a-7380-4a39-9103-07a2c0528d8e", + "size": 31364, + "location": { + "latitude": -41.1021, + "longitude": 62.5196, + "height": null, + "crs": "wgs-84" + } + } + ] +} +---- + +''' + +.GraphQL-Query +[source,graphql,request=true] +---- +query Photographs($longitude: Float!, $latitude: Float!) { + photographs( + where: {location_LT: {point: {longitude: $longitude, latitude: $latitude}, distance: 1000000}} + ) { + id + size + location { + latitude + longitude + height + crs + } + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "longitude": 62.5196, + "latitude": -40.1021 +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": { + "longitude": 62.5196, + "latitude": -41.1021 + } +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Photograph) +WHERE this.location = point($param0) +RETURN this { .id, .size, .location } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "photographs": [ + { + "id": "f8a5a58a-7380-4a39-9103-07a2c0528d8e", + "size": 31364, + "location": { + "latitude": -41.1021, + "longitude": 62.5196, + "height": null, + "crs": "wgs-84" + } + } + ] +} +---- + +''' + +.GraphQL-Query +[source,graphql,request=true] +---- +query Photographs($longitude: Float!, $latitude: Float!) { + photographs( + where: {location_GT: {point: {longitude: $longitude, latitude: $latitude}, distance: 1}} + ) { + id + size + location { + latitude + longitude + height + crs + } + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "longitude": 62.5196, + "latitude": -40.1021 +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": { + "longitude": 62.5196, + "latitude": -41.1021 + } +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Photograph) +WHERE this.location = point($param0) +RETURN this { .id, .size, .location } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "photographs": [ + { + "id": "f8a5a58a-7380-4a39-9103-07a2c0528d8e", + "size": 31364, + "location": { + "latitude": -41.1021, + "longitude": 62.5196, + "height": null, + "crs": "wgs-84" + } + } + ] +} +---- + == enables query for equality of a node with a wgs-84-3d point .Test Data @@ -41,7 +331,7 @@ CALL { ---- query Photographs($longitude: Float!, $latitude: Float!, $height: Float) { photographs( - where: {location: {longitude: $longitude, latitude: $latitude, height: $height}} + where: {location_EQ: {longitude: $longitude, latitude: $latitude, height: $height}} ) { id size @@ -82,10 +372,7 @@ query Photographs($longitude: Float!, $latitude: Float!, $height: Float) { ---- MATCH (this:Photograph) WHERE this.location = point($param0) -RETURN this { .id, .size, location: CASE - WHEN this.location IS NOT NULL THEN { point: this.location, crs: this.location.crs } - ELSE NULL -END } AS this +RETURN this { .id, .size, .location } AS this ---- .GraphQL-Response diff --git a/core/src/test/resources/integration-test-files/types/points-cartesian.adoc b/core/src/test/resources/integration-test-files/types/points-cartesian.adoc index 852b4e8e..299a78c6 100644 --- a/core/src/test/resources/integration-test-files/types/points-cartesian.adoc +++ b/core/src/test/resources/integration-test-files/types/points-cartesian.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Part { +type Part @node { id: String! locations: [CartesianPoint!]! } @@ -33,7 +33,7 @@ CALL { [source,graphql,request=true] ---- query Parts($id: String!) { - parts(where: {id: $id}) { + parts(where: {id_EQ: $id}) { id locations { y @@ -147,7 +147,7 @@ CALL { [source,graphql,request=true] ---- query Parts($id: String!) { - parts(where: {id: $id}) { + parts(where: {id_EQ: $id}) { id locations { y diff --git a/core/src/test/resources/integration-test-files/types/points-cartesian.js.adoc b/core/src/test/resources/integration-test-files/types/points-cartesian.js.adoc index 8121c85e..67378c63 100644 --- a/core/src/test/resources/integration-test-files/types/points-cartesian.js.adoc +++ b/core/src/test/resources/integration-test-files/types/points-cartesian.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Part { +type Part @node { id: String! locations: [CartesianPoint!]! } @@ -34,7 +34,7 @@ CALL { [source,graphql,request=true] ---- query Parts($id: String!) { - parts(where: {id: $id}) { + parts(where: {id_EQ: $id}) { id locations { y @@ -67,10 +67,7 @@ query Parts($id: String!) { ---- MATCH (this:Part) WHERE this.id = $param0 -RETURN this { .id, locations: CASE - WHEN this.locations IS NOT NULL THEN [var0 IN this.locations | { point: var0, crs: var0.crs }] - ELSE NULL -END } AS this +RETURN this { .id, .locations } AS this ---- .GraphQL-Response @@ -154,7 +151,7 @@ CALL { [source,graphql,request=true] ---- query Parts($id: String!) { - parts(where: {id: $id}) { + parts(where: {id_EQ: $id}) { id locations { y @@ -187,10 +184,7 @@ query Parts($id: String!) { ---- MATCH (this:Part) WHERE this.id = $param0 -RETURN this { .id, locations: CASE - WHEN this.locations IS NOT NULL THEN [var0 IN this.locations | { point: var0, crs: var0.crs }] - ELSE NULL -END } AS this +RETURN this { .id, .locations } AS this ---- .GraphQL-Response diff --git a/core/src/test/resources/integration-test-files/types/points.adoc b/core/src/test/resources/integration-test-files/types/points.adoc index 0cae9cf6..7f6dd5e8 100644 --- a/core/src/test/resources/integration-test-files/types/points.adoc +++ b/core/src/test/resources/integration-test-files/types/points.adoc @@ -8,12 +8,297 @@ .Schema [source,graphql,schema=true] ---- -type Route { +type Route @node { id: String! waypoints: [Point!]! } ---- +== enables query of a node with multiple wgs-84 points + +.Test Data +[source,cypher,test-data=true] +---- +CALL { + CREATE (r:Route) + SET r.id = "25c4676e-1e38-4b1b-b156-6a7e28c8013e" + SET r.waypoints = [p in [{longitude: 34.1879, latitude: 30.5402}, {longitude: 34.1879, latitude: 30.5402}, {longitude: 34.1879, latitude: 30.5402}, {longitude: 34.1879, latitude: 30.5402}, {longitude: 34.1879, latitude: 30.5402}, {longitude: 34.1879, latitude: 30.5402}, {longitude: 34.1879, latitude: 30.5402}, {longitude: 34.1879, latitude: 30.5402}, {longitude: 34.1879, latitude: 30.5402}] | point(p)] + RETURN r + } + + RETURN r { .id, .waypoints } AS r +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +query Routes($waypoints: [PointInput!]) { + routes(where: {waypoints_EQ: $waypoints}) { + id + waypoints { + latitude + longitude + height + crs + } + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "waypoints" : [ { + "longitude" : 34.1879, + "latitude" : 30.5402 + }, { + "longitude" : 34.1879, + "latitude" : 30.5402 + }, { + "longitude" : 34.1879, + "latitude" : 30.5402 + }, { + "longitude" : 34.1879, + "latitude" : 30.5402 + }, { + "longitude" : 34.1879, + "latitude" : 30.5402 + }, { + "longitude" : 34.1879, + "latitude" : 30.5402 + }, { + "longitude" : 34.1879, + "latitude" : 30.5402 + }, { + "longitude" : 34.1879, + "latitude" : 30.5402 + }, { + "longitude" : 34.1879, + "latitude" : 30.5402 + } ] +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : [ { + "longitude" : 34.1879, + "latitude" : 30.5402 + }, { + "longitude" : 34.1879, + "latitude" : 30.5402 + }, { + "longitude" : 34.1879, + "latitude" : 30.5402 + }, { + "longitude" : 34.1879, + "latitude" : 30.5402 + }, { + "longitude" : 34.1879, + "latitude" : 30.5402 + }, { + "longitude" : 34.1879, + "latitude" : 30.5402 + }, { + "longitude" : 34.1879, + "latitude" : 30.5402 + }, { + "longitude" : 34.1879, + "latitude" : 30.5402 + }, { + "longitude" : 34.1879, + "latitude" : 30.5402 + } ] +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Route) +WHERE this.waypoints = [p IN $param0 | point(p)] +RETURN this { + .id, + waypoints: CASE WHEN this.waypoints IS NOT NULL THEN [p_var0 IN this.waypoints | { + latitude: p_var0.latitude, + longitude: p_var0.longitude, + height: CASE WHEN p_var0.srid = 4979 THEN p_var0.height ELSE NULL END, + crs: p_var0.crs + }] ELSE NULL END +} AS this +---- + +.GraphQL-Response +[source,json,response=true,ignore-order] +---- +{ + "routes" : [ { + "id" : "25c4676e-1e38-4b1b-b156-6a7e28c8013e", + "waypoints" : [ { + "latitude" : 30.5402, + "longitude" : 34.1879, + "height" : null, + "crs" : "wgs-84" + }, { + "latitude" : 30.5402, + "longitude" : 34.1879, + "height" : null, + "crs" : "wgs-84" + }, { + "latitude" : 30.5402, + "longitude" : 34.1879, + "height" : null, + "crs" : "wgs-84" + }, { + "latitude" : 30.5402, + "longitude" : 34.1879, + "height" : null, + "crs" : "wgs-84" + }, { + "latitude" : 30.5402, + "longitude" : 34.1879, + "height" : null, + "crs" : "wgs-84" + }, { + "latitude" : 30.5402, + "longitude" : 34.1879, + "height" : null, + "crs" : "wgs-84" + }, { + "latitude" : 30.5402, + "longitude" : 34.1879, + "height" : null, + "crs" : "wgs-84" + }, { + "latitude" : 30.5402, + "longitude" : 34.1879, + "height" : null, + "crs" : "wgs-84" + }, { + "latitude" : 30.5402, + "longitude" : 34.1879, + "height" : null, + "crs" : "wgs-84" + } ] + } ] +} +---- + +''' + +.GraphQL-Query +[source,graphql,request=true] +---- +query RoutesIncludes($waypoint: PointInput) { + routes(where: {waypoints_INCLUDES: $waypoint}) { + id + waypoints { + latitude + longitude + height + crs + } + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "waypoint" : { + "longitude" : 34.1879, + "latitude" : 30.5402 + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : { + "longitude" : 34.1879, + "latitude" : 30.5402 + } +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Route) +WHERE point($param0) IN this.waypoints +RETURN this { + .id, + waypoints: CASE WHEN this.waypoints IS NOT NULL THEN [p_var0 IN this.waypoints | { + latitude: p_var0.latitude, + longitude: p_var0.longitude, + height: CASE WHEN p_var0.srid = 4979 THEN p_var0.height ELSE NULL END, + crs: p_var0.crs + }] ELSE NULL END +} AS this +---- + +.GraphQL-Response +[source,json,response=true,ignore-order] +---- +{ + "routes" : [ { + "id" : "25c4676e-1e38-4b1b-b156-6a7e28c8013e", + "waypoints" : [ { + "latitude" : 30.5402, + "longitude" : 34.1879, + "height" : null, + "crs" : "wgs-84" + }, { + "latitude" : 30.5402, + "longitude" : 34.1879, + "height" : null, + "crs" : "wgs-84" + }, { + "latitude" : 30.5402, + "longitude" : 34.1879, + "height" : null, + "crs" : "wgs-84" + }, { + "latitude" : 30.5402, + "longitude" : 34.1879, + "height" : null, + "crs" : "wgs-84" + }, { + "latitude" : 30.5402, + "longitude" : 34.1879, + "height" : null, + "crs" : "wgs-84" + }, { + "latitude" : 30.5402, + "longitude" : 34.1879, + "height" : null, + "crs" : "wgs-84" + }, { + "latitude" : 30.5402, + "longitude" : 34.1879, + "height" : null, + "crs" : "wgs-84" + }, { + "latitude" : 30.5402, + "longitude" : 34.1879, + "height" : null, + "crs" : "wgs-84" + }, { + "latitude" : 30.5402, + "longitude" : 34.1879, + "height" : null, + "crs" : "wgs-84" + } ] + } ] +} +---- + == enables query of a node with multiple wgs-84-3d points .Test Data @@ -33,7 +318,7 @@ CALL { [source,graphql,request=true] ---- query Routes($id: String!) { - routes(where: {id: $id}) { + routes(where: {id_EQ: $id}) { id waypoints { latitude diff --git a/core/src/test/resources/integration-test-files/types/points.js.adoc b/core/src/test/resources/integration-test-files/types/points.js.adoc index 4e5b26a5..a5a8fe01 100644 --- a/core/src/test/resources/integration-test-files/types/points.js.adoc +++ b/core/src/test/resources/integration-test-files/types/points.js.adoc @@ -9,12 +9,359 @@ .Schema [source,graphql,schema=true] ---- -type Route { +type Route @node { id: String! waypoints: [Point!]! } ---- +== enables query of a node with multiple wgs-84 points + +.Test Data +[source,cypher,test-data=true] +---- +CALL { + CREATE (r:Route) + SET r.id = "25c4676e-1e38-4b1b-b156-6a7e28c8013e" + SET r.waypoints = [p in [{longitude: 34.1879, latitude: 30.5402}, {longitude: 34.1879, latitude: 30.5402}, {longitude: 34.1879, latitude: 30.5402}, {longitude: 34.1879, latitude: 30.5402}, {longitude: 34.1879, latitude: 30.5402}, {longitude: 34.1879, latitude: 30.5402}, {longitude: 34.1879, latitude: 30.5402}, {longitude: 34.1879, latitude: 30.5402}, {longitude: 34.1879, latitude: 30.5402}] | point(p)] + RETURN r + } + + RETURN r { .id, .waypoints } AS r +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +query Routes($waypoints: [PointInput!]) { + routes(where: {waypoints_EQ: $waypoints}) { + id + waypoints { + latitude + longitude + height + crs + } + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "waypoints": [ + { + "longitude": 34.1879, + "latitude": 30.5402 + }, + { + "longitude": 34.1879, + "latitude": 30.5402 + }, + { + "longitude": 34.1879, + "latitude": 30.5402 + }, + { + "longitude": 34.1879, + "latitude": 30.5402 + }, + { + "longitude": 34.1879, + "latitude": 30.5402 + }, + { + "longitude": 34.1879, + "latitude": 30.5402 + }, + { + "longitude": 34.1879, + "latitude": 30.5402 + }, + { + "longitude": 34.1879, + "latitude": 30.5402 + }, + { + "longitude": 34.1879, + "latitude": 30.5402 + } + ] +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": [ + { + "longitude": 34.1879, + "latitude": 30.5402 + }, + { + "longitude": 34.1879, + "latitude": 30.5402 + }, + { + "longitude": 34.1879, + "latitude": 30.5402 + }, + { + "longitude": 34.1879, + "latitude": 30.5402 + }, + { + "longitude": 34.1879, + "latitude": 30.5402 + }, + { + "longitude": 34.1879, + "latitude": 30.5402 + }, + { + "longitude": 34.1879, + "latitude": 30.5402 + }, + { + "longitude": 34.1879, + "latitude": 30.5402 + }, + { + "longitude": 34.1879, + "latitude": 30.5402 + } + ] +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Route) +WHERE this.waypoints = [var0 IN $param0 | point(var0)] +RETURN this { .id, .waypoints } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "routes": [ + { + "id": "25c4676e-1e38-4b1b-b156-6a7e28c8013e", + "waypoints": [ + { + "latitude": 30.5402, + "longitude": 34.1879, + "height": null, + "crs": "wgs-84" + }, + { + "latitude": 30.5402, + "longitude": 34.1879, + "height": null, + "crs": "wgs-84" + }, + { + "latitude": 30.5402, + "longitude": 34.1879, + "height": null, + "crs": "wgs-84" + }, + { + "latitude": 30.5402, + "longitude": 34.1879, + "height": null, + "crs": "wgs-84" + }, + { + "latitude": 30.5402, + "longitude": 34.1879, + "height": null, + "crs": "wgs-84" + }, + { + "latitude": 30.5402, + "longitude": 34.1879, + "height": null, + "crs": "wgs-84" + }, + { + "latitude": 30.5402, + "longitude": 34.1879, + "height": null, + "crs": "wgs-84" + }, + { + "latitude": 30.5402, + "longitude": 34.1879, + "height": null, + "crs": "wgs-84" + }, + { + "latitude": 30.5402, + "longitude": 34.1879, + "height": null, + "crs": "wgs-84" + } + ] + } + ] +} +---- + +''' + +.GraphQL-Query +[source,graphql,request=true] +---- +query RoutesIncludes($waypoint: PointInput) { + routes(where: {waypoints_INCLUDES: $waypoint}) { + id + waypoints { + latitude + longitude + height + crs + } + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "waypoint": { + "longitude": 34.1879, + "latitude": 30.5402 + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": [ + { + "longitude": 34.1879, + "latitude": 30.5402 + }, + { + "longitude": 34.1879, + "latitude": 30.5402 + }, + { + "longitude": 34.1879, + "latitude": 30.5402 + }, + { + "longitude": 34.1879, + "latitude": 30.5402 + }, + { + "longitude": 34.1879, + "latitude": 30.5402 + }, + { + "longitude": 34.1879, + "latitude": 30.5402 + }, + { + "longitude": 34.1879, + "latitude": 30.5402 + }, + { + "longitude": 34.1879, + "latitude": 30.5402 + }, + { + "longitude": 34.1879, + "latitude": 30.5402 + } + ] +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Route) +WHERE this.waypoints = [var0 IN $param0 | point(var0)] +RETURN this { .id, .waypoints } AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "routes": [ + { + "id": "25c4676e-1e38-4b1b-b156-6a7e28c8013e", + "waypoints": [ + { + "latitude": 30.5402, + "longitude": 34.1879, + "height": null, + "crs": "wgs-84" + }, + { + "latitude": 30.5402, + "longitude": 34.1879, + "height": null, + "crs": "wgs-84" + }, + { + "latitude": 30.5402, + "longitude": 34.1879, + "height": null, + "crs": "wgs-84" + }, + { + "latitude": 30.5402, + "longitude": 34.1879, + "height": null, + "crs": "wgs-84" + }, + { + "latitude": 30.5402, + "longitude": 34.1879, + "height": null, + "crs": "wgs-84" + }, + { + "latitude": 30.5402, + "longitude": 34.1879, + "height": null, + "crs": "wgs-84" + }, + { + "latitude": 30.5402, + "longitude": 34.1879, + "height": null, + "crs": "wgs-84" + }, + { + "latitude": 30.5402, + "longitude": 34.1879, + "height": null, + "crs": "wgs-84" + }, + { + "latitude": 30.5402, + "longitude": 34.1879, + "height": null, + "crs": "wgs-84" + } + ] + } + ] +} +---- + == enables query of a node with multiple wgs-84-3d points .Test Data @@ -34,7 +381,7 @@ CALL { [source,graphql,request=true] ---- query Routes($id: String!) { - routes(where: {id: $id}) { + routes(where: {id_EQ: $id}) { id waypoints { latitude @@ -67,10 +414,7 @@ query Routes($id: String!) { ---- MATCH (this:Route) WHERE this.id = $param0 -RETURN this { .id, waypoints: CASE - WHEN this.waypoints IS NOT NULL THEN [var0 IN this.waypoints | { point: var0, crs: var0.crs }] - ELSE NULL -END } AS this +RETURN this { .id, .waypoints } AS this ---- .GraphQL-Response diff --git a/core/src/test/resources/integration-test-files/types/time.adoc b/core/src/test/resources/integration-test-files/types/time.adoc index 1c727237..f0b55daa 100644 --- a/core/src/test/resources/integration-test-files/types/time.adoc +++ b/core/src/test/resources/integration-test-files/types/time.adoc @@ -10,7 +10,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID! time: Time! } @@ -29,7 +29,7 @@ CREATE (movie:Movie) [source,graphql,request=true] ---- query ($time: Time!) { - movies(where: {time: $time}) { + movies(where: {time_EQ: $time}) { id time } @@ -91,7 +91,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{time: ASC}]}) { + movies(where: $where, sort: [{time: ASC}]) { id time } @@ -159,7 +159,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{time: ASC}]}) { + movies(where: $where, sort: [{time: ASC}]) { id time } @@ -230,7 +230,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{time: ASC}]}) { + movies(where: $where, sort: [{time: ASC}]) { id time } @@ -298,7 +298,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{time: ASC}]}) { + movies(where: $where, sort: [{time: ASC}]) { id time } @@ -359,7 +359,7 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID! time: Time! } @@ -382,10 +382,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($futureId: ID!, $presentId: ID!, $pastId: ID!, $sort: SortDirection!) { - movies( - where: {id_IN: [$futureId, $presentId, $pastId]} - options: {sort: [{time: $sort}]} - ) { + movies(where: {id_IN: [$futureId, $presentId, $pastId]}, sort: [{time: $sort}]) { id time } @@ -446,10 +443,7 @@ RETURN this { [source,graphql,request=true] ---- query ($futureId: ID!, $presentId: ID!, $pastId: ID!, $sort: SortDirection!) { - movies( - where: {id_IN: [$futureId, $presentId, $pastId]} - options: {sort: [{time: $sort}]} - ) { + movies(where: {id_IN: [$futureId, $presentId, $pastId]}, sort: [{time: $sort}]) { id time } diff --git a/core/src/test/resources/integration-test-files/types/time.js.adoc b/core/src/test/resources/integration-test-files/types/time.js.adoc index bdbfe01f..534c35fc 100644 --- a/core/src/test/resources/integration-test-files/types/time.js.adoc +++ b/core/src/test/resources/integration-test-files/types/time.js.adoc @@ -11,7 +11,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID! time: Time! } @@ -30,7 +30,7 @@ CREATE (movie:Movie) [source,graphql,request=true] ---- query ($time: Time!) { - movies(where: {time: $time}) { + movies(where: {time_EQ: $time}) { id time } @@ -91,7 +91,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{time: ASC}]}) { + movies(where: $where, sort: [{time: ASC}]) { id time } @@ -166,7 +166,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{time: ASC}]}) { + movies(where: $where, sort: [{time: ASC}]) { id time } @@ -245,7 +245,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{time: ASC}]}) { + movies(where: $where, sort: [{time: ASC}]) { id time } @@ -320,7 +320,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($where: MovieWhere!) { - movies(where: $where, options: {sort: [{time: ASC}]}) { + movies(where: $where, sort: [{time: ASC}]) { id time } @@ -389,7 +389,7 @@ RETURN this { .id, .time } AS this .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID! time: Time! } @@ -412,10 +412,7 @@ CREATE (future:Movie) [source,graphql,request=true] ---- query ($futureId: ID!, $presentId: ID!, $pastId: ID!, $sort: SortDirection!) { - movies( - where: {id_IN: [$futureId, $presentId, $pastId]} - options: {sort: [{time: $sort}]} - ) { + movies(where: {id_IN: [$futureId, $presentId, $pastId]}, sort: [{time: $sort}]) { id time } @@ -482,10 +479,7 @@ RETURN this { .id, .time } AS this [source,graphql,request=true] ---- query ($futureId: ID!, $presentId: ID!, $pastId: ID!, $sort: SortDirection!) { - movies( - where: {id_IN: [$futureId, $presentId, $pastId]} - options: {sort: [{time: $sort}]} - ) { + movies(where: {id_IN: [$futureId, $presentId, $pastId]}, sort: [{time: $sort}]) { id time } diff --git a/core/src/test/resources/integration-test-files/undirected-relationships.adoc b/core/src/test/resources/integration-test-files/undirected-relationships.adoc deleted file mode 100644 index 3a411e93..00000000 --- a/core/src/test/resources/integration-test-files/undirected-relationships.adoc +++ /dev/null @@ -1,89 +0,0 @@ -:toc: -:toclevels: 42 - -= undirected relationships - -== query for an undirected relationship - -.Schema -[source,graphql,schema=true] ----- -type User { - name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT) -} ----- - -.Test Data -[source,cypher,test-data=true] ----- -CREATE (a:User {name: "Arthur"}) - CREATE (b:User {name: "Ford"}) - CREATE (a)-[:FRIENDS_WITH]->(b) ----- - -.GraphQL-Query -[source,graphql,request=true] ----- -{ - users(where: {name: "Ford"}) { - name - friends: friends(directed: false) { - name - } - directedFriends: friends(directed: true) { - name - } - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ - "param0" : "Ford" -} ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:User) -WHERE this.name = $param0 -CALL { - WITH this - MATCH (this)-[friendsWith0:FRIENDS_WITH]-(user0:User) - WITH user0 { - .name - } AS friends - RETURN collect(friends) AS friends -} -CALL { - WITH this - MATCH (this)-[friendsWith1:FRIENDS_WITH]->(user1:User) - WITH user1 { - .name - } AS directedFriends - RETURN collect(directedFriends) AS directedFriends -} -RETURN this { - .name, - friends: friends, - directedFriends: directedFriends -} AS this ----- - -.GraphQL-Response -[source,json,response=true] ----- -{ - "users" : [ { - "name" : "Ford", - "friends" : [ { - "name" : "Arthur" - } ], - "directedFriends" : [ ] - } ] -} ----- diff --git a/core/src/test/resources/integration-test-files/undirected-relationships.js.adoc b/core/src/test/resources/integration-test-files/undirected-relationships.js.adoc deleted file mode 100644 index 817a5426..00000000 --- a/core/src/test/resources/integration-test-files/undirected-relationships.js.adoc +++ /dev/null @@ -1,86 +0,0 @@ -// This file was generated by the Test-Case extractor of neo4j-graphql -:toc: -:toclevels: 42 - -= undirected relationships - -== query for an undirected relationship - -.Schema -[source,graphql,schema=true] ----- -type User { - name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT) -} ----- - -.Test Data -[source,cypher,test-data=true] ----- -CREATE (a:User {name: "Arthur"}) - CREATE (b:User {name: "Ford"}) - CREATE (a)-[:FRIENDS_WITH]->(b) ----- - -.GraphQL-Query -[source,graphql,request=true] ----- -{ - users(where: {name: "Ford"}) { - name - friends: friends(directed: false) { - name - } - directedFriends: friends(directed: true) { - name - } - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ - "param0": "Ford" -} ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:User) -WHERE this.name = $param0 -CALL { - WITH this - MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) - WITH this1 { .name } AS this1 - RETURN collect(this1) AS var2 -} -CALL { - WITH this - MATCH (this)-[this3:FRIENDS_WITH]->(this4:User) - WITH this4 { .name } AS this4 - RETURN collect(this4) AS var5 -} -RETURN this { .name, friends: var2, directedFriends: var5 } AS this ----- - -.GraphQL-Response -[source,json,response=true] ----- -{ - "users": [ - { - "name": "Ford", - "friends": [ - { - "name": "Arthur" - } - ], - "directedFriends": [] - } - ] -} ----- diff --git a/core/src/test/resources/integration-test-files/unions/union-relationship-filtering.adoc b/core/src/test/resources/integration-test-files/unions/union-relationship-filtering.adoc index a89e0200..f14f22a8 100644 --- a/core/src/test/resources/integration-test-files/unions/union-relationship-filtering.adoc +++ b/core/src/test/resources/integration-test-files/unions/union-relationship-filtering.adoc @@ -10,17 +10,17 @@ ---- union Production = Movie | Series -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") } -type Series { +type Series @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") } -type Actor { +type Actor @node { name: String! actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } @@ -57,7 +57,7 @@ CREATE(m1:Movie { title: "The Office" }) ---- { productions( - where: {Movie: {title: "The Office"}, Series: {title: "The Office 2"}} + where: {Movie: {title_EQ: "The Office"}, Series: {title_EQ: "The Office 2"}} ) { ... on Movie { title diff --git a/core/src/test/resources/integration-test-files/unions/union-relationship-filtering.js.adoc b/core/src/test/resources/integration-test-files/unions/union-relationship-filtering.js.adoc index dc78e4a0..6f90932f 100644 --- a/core/src/test/resources/integration-test-files/unions/union-relationship-filtering.js.adoc +++ b/core/src/test/resources/integration-test-files/unions/union-relationship-filtering.js.adoc @@ -11,17 +11,17 @@ ---- union Production = Movie | Series -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") } -type Series { +type Series @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") } -type Actor { +type Actor @node { name: String! actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } @@ -58,7 +58,7 @@ CREATE(m1:Movie { title: "The Office" }) ---- { productions( - where: {Movie: {title: "The Office"}, Series: {title: "The Office 2"}} + where: {Movie: {title_EQ: "The Office"}, Series: {title_EQ: "The Office 2"}} ) { ... on Movie { title diff --git a/core/src/test/resources/integration-test-files/unions/unions-top-level.adoc b/core/src/test/resources/integration-test-files/unions/unions-top-level.adoc index 84fb5fb6..715a3486 100644 --- a/core/src/test/resources/integration-test-files/unions/unions-top-level.adoc +++ b/core/src/test/resources/integration-test-files/unions/unions-top-level.adoc @@ -10,11 +10,11 @@ ---- union Search = Genre | Movie -type Genre { +type Genre @node { name: String } -type Movie { +type Movie @node { title: String search: [Search!]! @relationship(type: "SEARCH", direction: OUT) } @@ -118,13 +118,266 @@ RETURN this AS this } ---- +== should read top-level simple query on union with filters on relationship field + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + searches( + where: {Movie: {searchConnection_SOME: {Genre: {node: {name_EQ: "Action"}}}}} + ) { + ... on Genre { + name + } + ... on Movie { + title + search { + ... on Genre { + name + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Action" +} +---- + +.Expected Cypher output +[source,cypher] +---- +CALL { + MATCH (movie0:Movie) + WHERE EXISTS { + MATCH (movie0)-[edge0:SEARCH]->(movie00:Genre) + WHERE movie00.name = $param0 + } + CALL { + WITH movie0 + CALL { + WITH * + MATCH (movie0)-[search1:SEARCH]->(genre0:Genre) + WITH genre0 { + __typename: 'Genre', + __id: elementId(genre0), + .name + } AS genre0 + RETURN genre0 AS search0 UNION + WITH * + MATCH (movie0)-[search2:SEARCH]->(movie1:Movie) + WITH movie1 { + __typename: 'Movie', + __id: elementId(movie1) + } AS movie1 + RETURN movie1 AS search0 + } + WITH search0 + RETURN collect(search0) AS search0 + } + WITH movie0 { + __typename: 'Movie', + __id: elementId(movie0), + .title, + search: search0 + } AS movie0 + RETURN movie0 AS this +} +WITH this +RETURN this AS this +---- + +.GraphQL-Response +[source,json,response=true,ignore-order] +---- +{ + "searches" : [ { + "title" : "The Matrix", + "search" : [ { + "name" : "Action" + }, { } ] + } ] +} +---- + +== should read top-level simple query on union with filters - only specifying a filter for one constituent automatically filters-out the other constituents from the return data + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + searches(where: {Movie: {NOT: {title_EQ: "The Matrix"}}}) { + ... on Genre { + name + } + ... on Movie { + title + search { + ... on Genre { + name + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "The Matrix" +} +---- + +.Expected Cypher output +[source,cypher] +---- +CALL { + MATCH (movie0:Movie) + WHERE NOT (movie0.title = $param0) + CALL { + WITH movie0 + CALL { + WITH * + MATCH (movie0)-[search1:SEARCH]->(genre0:Genre) + WITH genre0 { + __typename: 'Genre', + __id: elementId(genre0), + .name + } AS genre0 + RETURN genre0 AS search0 UNION + WITH * + MATCH (movie0)-[search2:SEARCH]->(movie1:Movie) + WITH movie1 { + __typename: 'Movie', + __id: elementId(movie1) + } AS movie1 + RETURN movie1 AS search0 + } + WITH search0 + RETURN collect(search0) AS search0 + } + WITH movie0 { + __typename: 'Movie', + __id: elementId(movie0), + .title, + search: search0 + } AS movie0 + RETURN movie0 AS this +} +WITH this +RETURN this AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "searches" : [ ] +} +---- + +== should read top-level simple query on union with filters + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + searches(where: {Movie: {NOT: {title_EQ: "The Matrix"}}, Genre: {}}) { + ... on Genre { + name + } + ... on Movie { + title + search { + ... on Genre { + name + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "The Matrix" +} +---- + +.Expected Cypher output +[source,cypher] +---- +CALL { + MATCH (genre0:Genre) + WITH genre0 { + __typename: 'Genre', + __id: elementId(genre0), + .name + } AS genre0 + RETURN genre0 AS this UNION + MATCH (movie0:Movie) + WHERE NOT (movie0.title = $param0) + CALL { + WITH movie0 + CALL { + WITH * + MATCH (movie0)-[search1:SEARCH]->(genre1:Genre) + WITH genre1 { + __typename: 'Genre', + __id: elementId(genre1), + .name + } AS genre1 + RETURN genre1 AS search0 UNION + WITH * + MATCH (movie0)-[search2:SEARCH]->(movie1:Movie) + WITH movie1 { + __typename: 'Movie', + __id: elementId(movie1) + } AS movie1 + RETURN movie1 AS search0 + } + WITH search0 + RETURN collect(search0) AS search0 + } + WITH movie0 { + __typename: 'Movie', + __id: elementId(movie0), + .title, + search: search0 + } AS movie0 + RETURN movie0 AS this +} +WITH this +RETURN this AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "searches" : [ { + "name" : "Action" + } ] +} +---- + == should read top-level simple query on union sorted .GraphQL-Query [source,graphql,request=true] ---- { - searches(options: {limit: 1, offset: 1}) { + searches(limit: 1, offset: 1) { ... on Genre { name } diff --git a/core/src/test/resources/integration-test-files/unions/unions-top-level.js.adoc b/core/src/test/resources/integration-test-files/unions/unions-top-level.js.adoc index 59b42bb6..7eaa7ccd 100644 --- a/core/src/test/resources/integration-test-files/unions/unions-top-level.js.adoc +++ b/core/src/test/resources/integration-test-files/unions/unions-top-level.js.adoc @@ -2,20 +2,20 @@ :toc: :toclevels: 42 -= Top-level union query fields +== Top-level union query fields -== Setup +=== Setup .Schema [source,graphql,schema=true] ---- union Search = Genre | Movie -type Genre { +type Genre @node { name: String } -type Movie { +type Movie @node { title: String search: [Search!]! @relationship(type: "SEARCH", direction: OUT) } @@ -30,7 +30,7 @@ CREATE (m:Movie {title: "The Matrix"}) MERGE (m)-[:SEARCH]->(g) ---- -== should read top-level simple query on union +=== should read top-level simple query on union .GraphQL-Query [source,graphql,request=true] @@ -111,13 +111,237 @@ RETURN this AS this } ---- -== should read top-level simple query on union sorted +=== should read top-level simple query on union with filters .GraphQL-Query [source,graphql,request=true] ---- { - searches(options: {limit: 1, offset: 1}) { + searches(where: {Movie: {NOT: {title_EQ: "The Matrix"}}, Genre: {}}) { + ... on Genre { + name + } + ... on Movie { + title + search { + ... on Genre { + name + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "The Matrix" +} +---- + +.Expected Cypher output +[source,cypher] +---- +CALL { + MATCH (this0:Genre) + WITH this0 { .name, __typename: "Genre", __id: toString(id(this0)) } AS this0 + RETURN this0 AS this + UNION + MATCH (this1:Movie) + WHERE NOT (this1.title = $param0) + CALL { + WITH this1 + CALL { + WITH * + MATCH (this1)-[this2:SEARCH]->(this3:Genre) + WITH this3 { .name, __typename: "Genre", __id: toString(id(this3)) } AS this3 + RETURN this3 AS var4 + UNION + WITH * + MATCH (this1)-[this5:SEARCH]->(this6:Movie) + WITH this6 { __typename: "Movie", __id: toString(id(this6)) } AS this6 + RETURN this6 AS var4 + } + WITH var4 + RETURN collect(var4) AS var4 + } + WITH this1 { .title, search: var4, __typename: "Movie", __id: toString(id(this1)) } AS this1 + RETURN this1 AS this +} +WITH this +RETURN this AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "searches": [ + { + "name": "Action" + } + ] +} +---- + +=== should read top-level simple query on union with filters - only specifying a filter for one constituent automatically filters-out the other constituents from the return data + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + searches(where: {Movie: {NOT: {title_EQ: "The Matrix"}}}) { + ... on Genre { + name + } + ... on Movie { + title + search { + ... on Genre { + name + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "The Matrix" +} +---- + +.Expected Cypher output +[source,cypher] +---- +CALL { + MATCH (this0:Movie) + WHERE NOT (this0.title = $param0) + CALL { + WITH this0 + CALL { + WITH * + MATCH (this0)-[this1:SEARCH]->(this2:Genre) + WITH this2 { .name, __typename: "Genre", __id: toString(id(this2)) } AS this2 + RETURN this2 AS var3 + UNION + WITH * + MATCH (this0)-[this4:SEARCH]->(this5:Movie) + WITH this5 { __typename: "Movie", __id: toString(id(this5)) } AS this5 + RETURN this5 AS var3 + } + WITH var3 + RETURN collect(var3) AS var3 + } + WITH this0 { .title, search: var3, __typename: "Movie", __id: toString(id(this0)) } AS this0 + RETURN this0 AS this +} +WITH this +RETURN this AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "searches": [] +} +---- + +=== should read top-level simple query on union with filters on relationship field + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + searches( + where: {Movie: {searchConnection_SOME: {Genre: {node: {name_EQ: "Action"}}}}} + ) { + ... on Genre { + name + } + ... on Movie { + title + search { + ... on Genre { + name + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Action" +} +---- + +.Expected Cypher output +[source,cypher] +---- +CALL { + MATCH (this0:Movie) + WHERE EXISTS { + MATCH (this0)-[this1:SEARCH]->(this2:Genre) + WHERE this2.name = $param0 + } + CALL { + WITH this0 + CALL { + WITH * + MATCH (this0)-[this3:SEARCH]->(this4:Genre) + WITH this4 { .name, __typename: "Genre", __id: toString(id(this4)) } AS this4 + RETURN this4 AS var5 + UNION + WITH * + MATCH (this0)-[this6:SEARCH]->(this7:Movie) + WITH this7 { __typename: "Movie", __id: toString(id(this7)) } AS this7 + RETURN this7 AS var5 + } + WITH var5 + RETURN collect(var5) AS var5 + } + WITH this0 { .title, search: var5, __typename: "Movie", __id: toString(id(this0)) } AS this0 + RETURN this0 AS this +} +WITH this +RETURN this AS this +---- + +.GraphQL-Response +[source,json,response=true] +---- +{ + "searches": [ + { + "title": "The Matrix", + "search": [ + { + "name": "Action" + }, + {} + ] + } + ] +} +---- + +=== should read top-level simple query on union sorted + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + searches(limit: 1, offset: 1) { ... on Genre { name } diff --git a/core/src/test/resources/integration-test-files/unions/unions.adoc b/core/src/test/resources/integration-test-files/unions/unions.adoc index ae20f0b5..e677b070 100644 --- a/core/src/test/resources/integration-test-files/unions/unions.adoc +++ b/core/src/test/resources/integration-test-files/unions/unions.adoc @@ -3,95 +3,6 @@ = unions -== read Unions with missing types - -.Schema -[source,graphql,schema=true] ----- -union Search = Genre | Movie - -type Genre { - name: String -} - -type Movie { - title: String - search: [Search!]! @relationship(type: "SEARCH", direction: OUT) -} ----- - -.Test Data -[source,cypher,test-data=true] ----- -CREATE (m:Movie {title: "RandomString1"}) - CREATE (g:Genre {name: "RandomString2"}) - MERGE (m)-[:SEARCH]->(m) - MERGE (m)-[:SEARCH]->(g) ----- - -.GraphQL-Query -[source,graphql,request=true] ----- -{ - movies { - search { - ... on Genre { - name - } - } - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ } ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:Movie) -CALL { - WITH this - CALL { - WITH * - MATCH (this)-[search1:SEARCH]->(genre0:Genre) - WITH genre0 { - __typename: 'Genre', - __id: elementId(genre0), - .name - } AS genre0 - RETURN genre0 AS search0 UNION - WITH * - MATCH (this)-[search2:SEARCH]->(movie0:Movie) - WITH movie0 { - __typename: 'Movie', - __id: elementId(movie0) - } AS movie0 - RETURN movie0 AS search0 - } - WITH search0 - RETURN collect(search0) AS search0 -} -RETURN this { - search: search0 -} AS this ----- - -.GraphQL-Response -[source,json,response=true,ignore-order] ----- -{ - "movies" : [ { - "search" : [ { - "name" : "RandomString2" - }, { } ] - } ] -} ----- - == should read and return unions .Schema @@ -99,11 +10,11 @@ RETURN this { ---- union Search = Genre | Movie -type Genre { +type Genre @node { name: String } -type Movie { +type Movie @node { title: String search: [Search!]! @relationship(type: "SEARCH", direction: OUT) } @@ -122,7 +33,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { search { __typename ... on Movie { @@ -200,11 +111,11 @@ RETURN this { ---- union Search = Movie | Genre -type Genre { +type Genre @node { name: String } -type Movie { +type Movie @node { title: String search: [Search!]! @relationship(type: "SEARCH", direction: OUT) } @@ -225,8 +136,8 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { - search(where: {Genre: {name: "RandomString2"}}) { + movies(where: {title_EQ: "RandomString1"}) { + search(where: {Genre: {name_EQ: "RandomString2"}}) { __typename ... on Movie { title @@ -257,20 +168,20 @@ CALL { WITH this CALL { WITH * - MATCH (this)-[this0:SEARCH]->(this1:Genre) - WHERE this1.name = $param1 - WITH this1 { - .name, + MATCH (this)-[search1:SEARCH]->(genre0:Genre) + WHERE genre0.name = $param1 + WITH genre0 { __typename: 'Genre', - __id: toString(id(this1)) - } AS this1 - RETURN this1 AS var2 + __id: elementId(genre0), + .name + } AS genre0 + RETURN genre0 AS search0 } - WITH var2 - RETURN collect(var2) AS var2 + WITH search0 + RETURN collect(search0) AS search0 } RETURN this { - search: var2 + search: search0 } AS this ---- @@ -294,11 +205,11 @@ RETURN this { ---- union Search = Movie | Genre -type Genre { +type Genre @node { name: String } -type Movie { +type Movie @node { title: String search: [Search!]! @relationship(type: "SEARCH", direction: OUT) } @@ -322,8 +233,8 @@ CREATE (m:Movie {title: "originalMovie"}) [source,graphql,request=true] ---- { - movies(where: {title: "originalMovie"}) { - search(options: {offset: 1, limit: 3}) { + movies(where: {title_EQ: "originalMovie"}) { + search(offset: 1, limit: 3) { ... on Movie { title } diff --git a/core/src/test/resources/integration-test-files/unions/unions.js.adoc b/core/src/test/resources/integration-test-files/unions/unions.js.adoc index 8694a121..d55b46b1 100644 --- a/core/src/test/resources/integration-test-files/unions/unions.js.adoc +++ b/core/src/test/resources/integration-test-files/unions/unions.js.adoc @@ -11,11 +11,11 @@ ---- union Search = Genre | Movie -type Genre { +type Genre @node { name: String } -type Movie { +type Movie @node { title: String search: [Search!]! @relationship(type: "SEARCH", direction: OUT) } @@ -97,11 +97,11 @@ RETURN this { search: var2 } AS this ---- union Search = Genre | Movie -type Genre { +type Genre @node { name: String } -type Movie { +type Movie @node { title: String search: [Search!]! @relationship(type: "SEARCH", direction: OUT) } @@ -120,7 +120,7 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { + movies(where: {title_EQ: "RandomString1"}) { search { __typename ... on Movie { @@ -194,11 +194,11 @@ RETURN this { search: var2 } AS this ---- union Search = Movie | Genre -type Genre { +type Genre @node { name: String } -type Movie { +type Movie @node { title: String search: [Search!]! @relationship(type: "SEARCH", direction: OUT) } @@ -219,8 +219,8 @@ CREATE (m:Movie {title: "RandomString1"}) [source,graphql,request=true] ---- { - movies(where: {title: "RandomString1"}) { - search(where: {Genre: {name: "RandomString2"}}) { + movies(where: {title_EQ: "RandomString1"}) { + search(where: {Genre: {name_EQ: "RandomString2"}}) { __typename ... on Movie { title @@ -286,11 +286,11 @@ RETURN this { search: var2 } AS this ---- union Search = Movie | Genre -type Genre { +type Genre @node { name: String } -type Movie { +type Movie @node { title: String search: [Search!]! @relationship(type: "SEARCH", direction: OUT) } @@ -314,8 +314,8 @@ CREATE (m:Movie {title: "originalMovie"}) [source,graphql,request=true] ---- { - movies(where: {title: "originalMovie"}) { - search(options: {offset: 1, limit: 3}) { + movies(where: {title_EQ: "originalMovie"}) { + search(offset: 1, limit: 3) { ... on Movie { title } @@ -375,10 +375,10 @@ RETURN this { search: var2 } AS this "name": "genre2" }, { - "title": "movie2" + "title": "movie1" }, { - "title": "movie1" + "title": "movie2" } ] } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/advanced-filtering.adoc b/core/src/test/resources/tck-test-files/cypher/v2/advanced-filtering.adoc index adc1e1ea..89d015af 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/advanced-filtering.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/advanced-filtering.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { _id: ID id: ID title: String @@ -17,7 +17,7 @@ type Movie { genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT) } -type Genre { +type Genre @node { name: String movies: [Movie!]! @relationship(type: "IN_GENRE", direction: IN) } @@ -44,6 +44,66 @@ type Genre { } ---- +== EQ + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {title_EQ: "The Matrix"}) { + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "The Matrix" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.title = $param0 +RETURN this { + .title +} AS this +---- + +== implicit EQ + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {title_EQ: "The Matrix"}) { + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "The Matrix" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.title = $param0 +RETURN this { + .title +} AS this +---- + == IN .GraphQL-Query @@ -104,6 +164,36 @@ RETURN this { } AS this ---- +== NOT + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {NOT: {id_EQ: "123"}}) { + id + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "123" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE NOT (this.id = $param0) +RETURN this { + .id +} AS this +---- + == CONTAINS .GraphQL-Query @@ -564,7 +654,7 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {genres_ALL: {name: "some genre"}}) { + movies(where: {genres_ALL: {name_EQ: "some genre"}}) { actorCount } } @@ -601,7 +691,7 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {genres_NONE: {name: "some genre"}}) { + movies(where: {genres_NONE: {name_EQ: "some genre"}}) { actorCount } } @@ -634,7 +724,7 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {genres_SINGLE: {name: "some genre"}}) { + movies(where: {genres_SINGLE: {name_EQ: "some genre"}}) { actorCount } } @@ -666,7 +756,7 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {genres_SOME: {name: "some genre"}}) { + movies(where: {genres_SOME: {name_EQ: "some genre"}}) { actorCount } } @@ -693,6 +783,72 @@ RETURN this { } AS this ---- +=== equality + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {genres_SOME: {name_EQ: "some genre"}}) { + actorCount + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "some genre" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE EXISTS { + MATCH (this)-[:IN_GENRE]->(this0:Genre) + WHERE this0.name = $param0 +} +RETURN this { + .actorCount +} AS this +---- + +=== NONE + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {genres_NONE: {name_EQ: "some genre"}}) { + actorCount + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "some genre" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE NOT (EXISTS { + MATCH (this)-[:IN_GENRE]->(this0:Genre) + WHERE this0.name = $param0 +}) +RETURN this { + .actorCount +} AS this +---- + == Connections === List Predicates @@ -703,7 +859,7 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {genresConnection_ALL: {node: {name: "some genre"}}}) { + movies(where: {genresConnection_ALL: {node: {name_EQ: "some genre"}}}) { actorCount } } @@ -722,11 +878,11 @@ RETURN this { ---- MATCH (this:Movie) WHERE (EXISTS { - MATCH (this)-[edge:IN_GENRE]->(this0:Genre) + MATCH (this)-[edge0:IN_GENRE]->(this0:Genre) WHERE this0.name = $param0 } AND NOT (EXISTS { - MATCH (this)-[edge:IN_GENRE]->(this0:Genre) + MATCH (this)-[edge0:IN_GENRE]->(this0:Genre) WHERE NOT (this0.name = $param0) })) RETURN this { @@ -740,7 +896,7 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {genresConnection_NONE: {node: {name: "some genre"}}}) { + movies(where: {genresConnection_NONE: {node: {name_EQ: "some genre"}}}) { actorCount } } @@ -759,7 +915,7 @@ RETURN this { ---- MATCH (this:Movie) WHERE NOT (EXISTS { - MATCH (this)-[edge:IN_GENRE]->(this0:Genre) + MATCH (this)-[edge0:IN_GENRE]->(this0:Genre) WHERE this0.name = $param0 }) RETURN this { @@ -773,7 +929,7 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {genresConnection_SINGLE: {node: {name: "some genre"}}}) { + movies(where: {genresConnection_SINGLE: {node: {name_EQ: "some genre"}}}) { actorCount } } @@ -791,7 +947,7 @@ RETURN this { [source,cypher] ---- MATCH (this:Movie) -WHERE single(ignore IN [(this)-[edge:IN_GENRE]->(this0:Genre) +WHERE single(ignore IN [(this)-[edge0:IN_GENRE]->(this0:Genre) WHERE this0.name = $param0 | 1] WHERE true) RETURN this { @@ -805,7 +961,40 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {genresConnection_SOME: {node: {name: "some genre"}}}) { + movies(where: {genresConnection_SOME: {node: {name_EQ: "some genre"}}}) { + actorCount + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "some genre" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE EXISTS { + MATCH (this)-[edge0:IN_GENRE]->(this0:Genre) + WHERE this0.name = $param0 +} +RETURN this { + .actorCount +} AS this +---- + +=== Node and relationship properties equality + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {genresConnection_SOME: {node: {name_EQ: "some genre"}}}) { actorCount } } @@ -824,10 +1013,43 @@ RETURN this { ---- MATCH (this:Movie) WHERE EXISTS { - MATCH (this)-[edge:IN_GENRE]->(this0:Genre) + MATCH (this)-[edge0:IN_GENRE]->(this0:Genre) WHERE this0.name = $param0 } RETURN this { .actorCount } AS this ---- + +=== Node and relationship properties NONE + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {genresConnection_NONE: {node: {name_EQ: "some genre"}}}) { + actorCount + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "some genre" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE NOT (EXISTS { + MATCH (this)-[edge0:IN_GENRE]->(this0:Genre) + WHERE this0.name = $param0 +}) +RETURN this { + .actorCount +} AS this +---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/advanced-filtering.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/advanced-filtering.js.adoc index 3808c938..71132003 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/advanced-filtering.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/advanced-filtering.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { _id: ID id: ID title: String @@ -18,7 +18,7 @@ type Movie { genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT) } -type Genre { +type Genre @node { name: String movies: [Movie!]! @relationship(type: "IN_GENRE", direction: IN) } @@ -45,6 +45,62 @@ type Genre { } ---- +== implicit EQ + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {title_EQ: "The Matrix"}) { + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "The Matrix" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.title = $param0 +RETURN this { .title } AS this +---- + +== EQ + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {title_EQ: "The Matrix"}) { + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "The Matrix" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.title = $param0 +RETURN this { .title } AS this +---- + == IN .GraphQL-Query @@ -103,6 +159,34 @@ WHERE this.id =~ $param0 RETURN this { .id } AS this ---- +== NOT + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {NOT: {id_EQ: "123"}}) { + id + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "123" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE NOT (this.id = $param0) +RETURN this { .id } AS this +---- + == CONTAINS .GraphQL-Query @@ -525,6 +609,68 @@ RETURN this { .title } AS this == Relationships +=== equality + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {genres_SOME: {name_EQ: "some genre"}}) { + actorCount + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "some genre" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE EXISTS { + MATCH (this)-[:IN_GENRE]->(this0:Genre) + WHERE this0.name = $param0 +} +RETURN this { .actorCount } AS this +---- + +=== NONE + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {genres_NONE: {name_EQ: "some genre"}}) { + actorCount + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "some genre" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE NOT (EXISTS { + MATCH (this)-[:IN_GENRE]->(this0:Genre) + WHERE this0.name = $param0 +}) +RETURN this { .actorCount } AS this +---- + === List Predicates ==== ALL @@ -533,7 +679,7 @@ RETURN this { .title } AS this [source,graphql,request=true] ---- { - movies(where: {genres_ALL: {name: "some genre"}}) { + movies(where: {genres_ALL: {name_EQ: "some genre"}}) { actorCount } } @@ -567,7 +713,7 @@ RETURN this { .actorCount } AS this [source,graphql,request=true] ---- { - movies(where: {genres_NONE: {name: "some genre"}}) { + movies(where: {genres_NONE: {name_EQ: "some genre"}}) { actorCount } } @@ -598,7 +744,7 @@ RETURN this { .actorCount } AS this [source,graphql,request=true] ---- { - movies(where: {genres_SINGLE: {name: "some genre"}}) { + movies(where: {genres_SINGLE: {name_EQ: "some genre"}}) { actorCount } } @@ -626,7 +772,7 @@ RETURN this { .actorCount } AS this [source,graphql,request=true] ---- { - movies(where: {genres_SOME: {name: "some genre"}}) { + movies(where: {genres_SOME: {name_EQ: "some genre"}}) { actorCount } } @@ -653,6 +799,68 @@ RETURN this { .actorCount } AS this == Connections +=== Node and relationship properties equality + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {genresConnection_SOME: {node: {name_EQ: "some genre"}}}) { + actorCount + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "some genre" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE EXISTS { + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) + WHERE this1.name = $param0 +} +RETURN this { .actorCount } AS this +---- + +=== Node and relationship properties NONE + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {genresConnection_NONE: {node: {name_EQ: "some genre"}}}) { + actorCount + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "some genre" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE NOT (EXISTS { + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) + WHERE this1.name = $param0 +}) +RETURN this { .actorCount } AS this +---- + === List Predicates ==== ALL @@ -661,7 +869,7 @@ RETURN this { .actorCount } AS this [source,graphql,request=true] ---- { - movies(where: {genresConnection_ALL: {node: {name: "some genre"}}}) { + movies(where: {genresConnection_ALL: {node: {name_EQ: "some genre"}}}) { actorCount } } @@ -695,7 +903,7 @@ RETURN this { .actorCount } AS this [source,graphql,request=true] ---- { - movies(where: {genresConnection_NONE: {node: {name: "some genre"}}}) { + movies(where: {genresConnection_NONE: {node: {name_EQ: "some genre"}}}) { actorCount } } @@ -726,7 +934,7 @@ RETURN this { .actorCount } AS this [source,graphql,request=true] ---- { - movies(where: {genresConnection_SINGLE: {node: {name: "some genre"}}}) { + movies(where: {genresConnection_SINGLE: {node: {name_EQ: "some genre"}}}) { actorCount } } @@ -754,7 +962,7 @@ RETURN this { .actorCount } AS this [source,graphql,request=true] ---- { - movies(where: {genresConnection_SOME: {node: {name: "some genre"}}}) { + movies(where: {genresConnection_SOME: {node: {name_EQ: "some genre"}}}) { actorCount } } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/arrays.adoc b/core/src/test/resources/tck-test-files/cypher/v2/arrays.adoc index d2a02ffb..3d7c7395 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/arrays.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/arrays.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! ratings: [Float!]! } @@ -31,7 +31,7 @@ type Movie { [source,json] ---- { - "param0" : 4 + "param0" : 4.0 } ---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/arrays.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/arrays.js.adoc index a0f87f71..6c0341f5 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/arrays.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/arrays.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! ratings: [Float!]! } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/alias.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/alias.adoc index 28721d94..b4bb477c 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/alias.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/alias.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } @@ -82,9 +82,9 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title - hanks: actorsConnection(where: {node: {name: "Tom Hanks"}}) { + hanks: actorsConnection(where: {node: {name_EQ: "Tom Hanks"}}) { edges { properties { screenTime @@ -94,7 +94,7 @@ RETURN this { } } } - jenny: actorsConnection(where: {node: {name: "Robin Wright"}}) { + jenny: actorsConnection(where: {node: {name_EQ: "Robin Wright"}}) { edges { properties { screenTime diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/alias.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/alias.js.adoc index c4bce893..c2077dc1 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/alias.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/alias.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } @@ -70,9 +70,9 @@ RETURN this { actors: var3 } AS this [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title - hanks: actorsConnection(where: {node: {name: "Tom Hanks"}}) { + hanks: actorsConnection(where: {node: {name_EQ: "Tom Hanks"}}) { edges { properties { screenTime @@ -82,7 +82,7 @@ RETURN this { actors: var3 } AS this } } } - jenny: actorsConnection(where: {node: {name: "Robin Wright"}}) { + jenny: actorsConnection(where: {node: {name_EQ: "Robin Wright"}}) { edges { properties { screenTime diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/composite.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/composite.adoc index 1c46de46..2690f3fe 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/composite.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/composite.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { firstName: String! lastName: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) @@ -30,10 +30,10 @@ type ActedIn @relationshipProperties { [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title actorsConnection( - where: {node: {AND: [{firstName: "Tom"}, {lastName: "Hanks"}]}, edge: {AND: [{screenTime_GT: 30}, {screenTime_LT: 90}]}} + where: {node: {AND: [{firstName_EQ: "Tom"}, {lastName_EQ: "Hanks"}]}, edge: {AND: [{screenTime_GT: 30}, {screenTime_LT: 90}]}} ) { edges { properties { @@ -111,10 +111,10 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title actorsConnection( - where: {node: {NOT: {firstName: "Tom", lastName: "Hanks"}}, edge: {NOT: {screenTime_GT: 30, screenTime_LT: 90}}} + where: {node: {NOT: {firstName_EQ: "Tom", lastName_EQ: "Hanks"}}, edge: {NOT: {screenTime_GT: 30, screenTime_LT: 90}}} ) { edges { properties { @@ -192,10 +192,10 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title actorsConnection( - where: {OR: [{node: {AND: [{firstName: "Tom"}, {lastName: "Hanks"}]}}, {edge: {AND: [{screenTime_GT: 30}, {screenTime_LT: 90}]}}]} + where: {OR: [{node: {AND: [{firstName_EQ: "Tom"}, {lastName_EQ: "Hanks"}]}}, {edge: {AND: [{screenTime_GT: 30}, {screenTime_LT: 90}]}}]} ) { edges { properties { @@ -273,10 +273,10 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title actorsConnection( - where: {NOT: {OR: [{node: {AND: [{firstName: "Tom"}, {lastName: "Hanks"}]}}, {edge: {AND: [{screenTime_GT: 30}, {screenTime_LT: 90}]}}]}} + where: {NOT: {OR: [{node: {AND: [{firstName_EQ: "Tom"}, {lastName_EQ: "Hanks"}]}}, {edge: {AND: [{screenTime_GT: 30}, {screenTime_LT: 90}]}}]}} ) { edges { properties { @@ -354,10 +354,10 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title actorsConnection( - where: {NOT: {AND: [{OR: [{node: {AND: [{firstName: "Tom"}, {lastName: "Hanks"}]}}, {edge: {AND: [{screenTime_GT: 30}, {screenTime_LT: 90}]}}]}, {node: {AND: [{firstName: "Tommy"}, {lastName: "Ford"}]}}]}} + where: {NOT: {AND: [{OR: [{node: {AND: [{firstName_EQ: "Tom"}, {lastName_EQ: "Hanks"}]}}, {edge: {AND: [{screenTime_GT: 30}, {screenTime_LT: 90}]}}]}, {node: {AND: [{firstName_EQ: "Tommy"}, {lastName_EQ: "Ford"}]}}]}} ) { edges { properties { diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/composite.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/composite.js.adoc index 636b4225..118d6439 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/composite.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/composite.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { firstName: String! lastName: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) @@ -31,10 +31,10 @@ type ActedIn @relationshipProperties { [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title actorsConnection( - where: {node: {AND: [{firstName: "Tom"}, {lastName: "Hanks"}]}, edge: {AND: [{screenTime_GT: 30}, {screenTime_LT: 90}]}} + where: {node: {AND: [{firstName_EQ: "Tom"}, {lastName_EQ: "Hanks"}]}, edge: {AND: [{screenTime_GT: 30}, {screenTime_LT: 90}]}} ) { edges { properties { @@ -90,10 +90,10 @@ RETURN this { .title, actorsConnection: var3 } AS this [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title actorsConnection( - where: {node: {NOT: {firstName: "Tom", lastName: "Hanks"}}, edge: {NOT: {screenTime_GT: 30, screenTime_LT: 90}}} + where: {node: {NOT: {firstName_EQ: "Tom", lastName_EQ: "Hanks"}}, edge: {NOT: {screenTime_GT: 30, screenTime_LT: 90}}} ) { edges { properties { @@ -149,10 +149,10 @@ RETURN this { .title, actorsConnection: var3 } AS this [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title actorsConnection( - where: {OR: [{node: {AND: [{firstName: "Tom"}, {lastName: "Hanks"}]}}, {edge: {AND: [{screenTime_GT: 30}, {screenTime_LT: 90}]}}]} + where: {OR: [{node: {AND: [{firstName_EQ: "Tom"}, {lastName_EQ: "Hanks"}]}}, {edge: {AND: [{screenTime_GT: 30}, {screenTime_LT: 90}]}}]} ) { edges { properties { @@ -208,10 +208,10 @@ RETURN this { .title, actorsConnection: var3 } AS this [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title actorsConnection( - where: {NOT: {OR: [{node: {AND: [{firstName: "Tom"}, {lastName: "Hanks"}]}}, {edge: {AND: [{screenTime_GT: 30}, {screenTime_LT: 90}]}}]}} + where: {NOT: {OR: [{node: {AND: [{firstName_EQ: "Tom"}, {lastName_EQ: "Hanks"}]}}, {edge: {AND: [{screenTime_GT: 30}, {screenTime_LT: 90}]}}]}} ) { edges { properties { @@ -267,10 +267,10 @@ RETURN this { .title, actorsConnection: var3 } AS this [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title actorsConnection( - where: {NOT: {AND: [{OR: [{node: {AND: [{firstName: "Tom"}, {lastName: "Hanks"}]}}, {edge: {AND: [{screenTime_GT: 30}, {screenTime_LT: 90}]}}]}, {node: {AND: [{firstName: "Tommy"}, {lastName: "Ford"}]}}]}} + where: {NOT: {AND: [{OR: [{node: {AND: [{firstName_EQ: "Tom"}, {lastName_EQ: "Hanks"}]}}, {edge: {AND: [{screenTime_GT: 30}, {screenTime_LT: 90}]}}]}, {node: {AND: [{firstName_EQ: "Tommy"}, {lastName_EQ: "Ford"}]}}]}} ) { edges { properties { diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/and.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/and.adoc index 55c87bd2..349de293 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/and.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/and.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { firstName: String! lastName: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) @@ -33,7 +33,7 @@ type ActedIn @relationshipProperties { movies { title actorsConnection( - where: {node: {AND: [{firstName: "Tom"}, {lastName: "Hanks"}]}} + where: {node: {AND: [{firstName_EQ: "Tom"}, {lastName_EQ: "Hanks"}]}} ) { edges { properties { @@ -107,7 +107,7 @@ RETURN this { { movies { title - actorsConnection(where: {node: {NOT: {firstName: "Tom"}}}) { + actorsConnection(where: {node: {NOT: {firstName_EQ: "Tom"}}}) { edges { properties { screenTime diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/and.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/and.js.adoc index fd146cc6..8bd33246 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/and.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/and.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { firstName: String! lastName: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) @@ -34,7 +34,7 @@ type ActedIn @relationshipProperties { movies { title actorsConnection( - where: {node: {AND: [{firstName: "Tom"}, {lastName: "Hanks"}]}} + where: {node: {AND: [{firstName_EQ: "Tom"}, {lastName_EQ: "Hanks"}]}} ) { edges { properties { @@ -88,7 +88,7 @@ RETURN this { .title, actorsConnection: var3 } AS this { movies { title - actorsConnection(where: {node: {NOT: {firstName: "Tom"}}}) { + actorsConnection(where: {node: {NOT: {firstName_EQ: "Tom"}}}) { edges { properties { screenTime diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/arrays.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/arrays.adoc index 7840409a..dfba536b 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/arrays.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/arrays.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! favouriteColours: [String!] movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/arrays.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/arrays.js.adoc index 200ac356..516e5d84 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/arrays.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/arrays.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! favouriteColours: [String!] movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/equality.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/equality.adoc index e62c02b3..3c303f9e 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/equality.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/equality.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } @@ -31,7 +31,7 @@ type ActedIn @relationshipProperties { { movies { title - actorsConnection(where: {node: {name: "Tom Hanks"}}) { + actorsConnection(where: {node: {name_EQ: "Tom Hanks"}}) { edges { properties { screenTime @@ -91,3 +91,72 @@ RETURN this { actorsConnection: actorsConnection } AS this ---- + +== Inequality + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies { + title + actorsConnection(where: {node: {NOT: {name_EQ: "Tom Hanks"}}}) { + edges { + properties { + screenTime + } + node { + name + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Tom Hanks" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +CALL { + WITH this + MATCH (actor0:Actor)-[actedIn0:ACTED_IN]->(this) + WHERE NOT (actor0.name = $param0) + WITH collect( { + node: actor0, + relationship: actedIn0 + }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS actor0, edge.relationship AS actedIn0 + RETURN collect( { + properties: { + __typename: 'ActedIn', + screenTime: actedIn0.screenTime + }, + node: { + __typename: 'Actor', + name: actor0.name + } + }) AS actorsConnectionEdges + } + RETURN { + edges: actorsConnectionEdges, + totalCount: totalCount + } AS actorsConnection +} +RETURN this { + .title, + actorsConnection: actorsConnection +} AS this +---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/equality.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/equality.js.adoc index 6ac70701..ec2651e8 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/equality.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/equality.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } @@ -32,7 +32,7 @@ type ActedIn @relationshipProperties { { movies { title - actorsConnection(where: {node: {name: "Tom Hanks"}}) { + actorsConnection(where: {node: {name_EQ: "Tom Hanks"}}) { edges { properties { screenTime @@ -74,3 +74,54 @@ CALL { } RETURN this { .title, actorsConnection: var3 } AS this ---- + +== Inequality + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies { + title + actorsConnection(where: {node: {NOT: {name_EQ: "Tom Hanks"}}}) { + edges { + properties { + screenTime + } + node { + name + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Tom Hanks" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +CALL { + WITH this + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) + WHERE NOT (this1.name = $param0) + WITH collect({ node: this1, relationship: this0 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1, edge.relationship AS this0 + RETURN collect({ properties: { screenTime: this0.screenTime, __typename: "ActedIn" }, node: { name: this1.name, __typename: "Actor" } }) AS var2 + } + RETURN { edges: var2, totalCount: totalCount } AS var3 +} +RETURN this { .title, actorsConnection: var3 } AS this +---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/numerical.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/numerical.adoc index 83e6e1f0..29377ce6 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/numerical.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/numerical.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! age: Int! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/numerical.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/numerical.js.adoc index dda64b99..535cc5cd 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/numerical.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/numerical.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! age: Int! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/or.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/or.adoc index f96dc912..bbd42095 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/or.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/or.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { firstName: String! lastName: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) @@ -32,7 +32,9 @@ type ActedIn @relationshipProperties { { movies { title - actorsConnection(where: {node: {OR: [{firstName: "Tom"}, {lastName: "Hanks"}]}}) { + actorsConnection( + where: {node: {OR: [{firstName_EQ: "Tom"}, {lastName_EQ: "Hanks"}]}} + ) { edges { properties { screenTime diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/or.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/or.js.adoc index 089a2861..6cb9309f 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/or.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/or.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { firstName: String! lastName: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) @@ -33,7 +33,9 @@ type ActedIn @relationshipProperties { { movies { title - actorsConnection(where: {node: {OR: [{firstName: "Tom"}, {lastName: "Hanks"}]}}) { + actorsConnection( + where: {node: {OR: [{firstName_EQ: "Tom"}, {lastName_EQ: "Hanks"}]}} + ) { edges { properties { screenTime diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/points.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/points.adoc index c5e19bbb..58fa3ee7 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/points.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/points.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! currentLocation: Point! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/points.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/points.js.adoc index 110b21bd..527b04ae 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/points.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/points.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! currentLocation: Point! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) @@ -81,10 +81,7 @@ CALL { WITH edges UNWIND edges AS edge WITH edge.node AS this1, edge.relationship AS this0 - RETURN collect({ properties: { screenTime: this0.screenTime, __typename: "ActedIn" }, node: { name: this1.name, currentLocation: CASE - WHEN this1.currentLocation IS NOT NULL THEN { point: this1.currentLocation } - ELSE NULL - END, __typename: "Actor" } }) AS var2 + RETURN collect({ properties: { screenTime: this0.screenTime, __typename: "ActedIn" }, node: { name: this1.name, currentLocation: this1.currentLocation, __typename: "Actor" } }) AS var2 } RETURN { edges: var2, totalCount: totalCount } AS var3 } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/relationship.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/relationship.adoc new file mode 100644 index 00000000..27c0caea --- /dev/null +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/relationship.adoc @@ -0,0 +1,85 @@ +:toc: +:toclevels: 42 + += Cypher -> Connections -> Filtering -> Node -> Relationship + +== Setup + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + title: String! + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) +} + +type Actor @node { + name: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) +} +---- + +== Equality + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies { + title + actorsConnection(where: {node: {movies_SOME: {title_EQ: "Forrest Gump"}}}) { + edges { + node { + name + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Forrest Gump" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +CALL { + WITH this + MATCH (actor0:Actor)-[actedIn0:ACTED_IN]->(this) + WHERE EXISTS { + MATCH (actor0)-[:ACTED_IN]->(actor00:Movie) + WHERE actor00.title = $param0 + } + WITH collect( { + node: actor0, + relationship: actedIn0 + }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS actor0, edge.relationship AS actedIn0 + RETURN collect( { + node: { + __typename: 'Actor', + name: actor0.name + } + }) AS actorsConnectionEdges + } + RETURN { + edges: actorsConnectionEdges, + totalCount: totalCount + } AS actorsConnection +} +RETURN this { + .title, + actorsConnection: actorsConnection +} AS this +---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/relationship.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/relationship.js.adoc new file mode 100644 index 00000000..d7f7e45b --- /dev/null +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/relationship.js.adoc @@ -0,0 +1,72 @@ +// This file was generated by the Test-Case extractor of neo4j-graphql +:toc: +:toclevels: 42 + += Cypher -> Connections -> Filtering -> Node -> Relationship + +== Setup + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + title: String! + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) +} + +type Actor @node { + name: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) +} +---- + +== Equality + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies { + title + actorsConnection(where: {node: {movies_SOME: {title_EQ: "Forrest Gump"}}}) { + edges { + node { + name + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Forrest Gump" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +CALL { + WITH this + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) + WHERE EXISTS { + MATCH (this1)-[:ACTED_IN]->(this2:Movie) + WHERE this2.title = $param0 + } + WITH collect({ node: this1, relationship: this0 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1, edge.relationship AS this0 + RETURN collect({ node: { name: this1.name, __typename: "Actor" } }) AS var3 + } + RETURN { edges: var3, totalCount: totalCount } AS var4 +} +RETURN this { .title, actorsConnection: var4 } AS this +---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/string.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/string.adoc index e1e637b3..71d2de82 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/string.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/string.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/string.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/string.js.adoc index 078cf1d6..8fa7eaf3 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/string.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/node/string.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/and.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/and.adoc index e0f1aa35..022efb52 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/and.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/and.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/and.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/and.js.adoc index 461e3d2a..3afb42a3 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/and.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/and.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/arrays.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/arrays.adoc index 97fd92c7..5cf58635 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/arrays.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/arrays.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/arrays.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/arrays.js.adoc index c71010df..ae838db7 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/arrays.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/arrays.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/equality.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/equality.adoc index 009b5221..bb93eb1f 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/equality.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/equality.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } @@ -31,7 +31,7 @@ type ActedIn @relationshipProperties { { movies { title - actorsConnection(where: {edge: {screenTime: 60}}) { + actorsConnection(where: {edge: {screenTime_EQ: 60}}) { edges { properties { screenTime @@ -91,3 +91,72 @@ RETURN this { actorsConnection: actorsConnection } AS this ---- + +== Inequality + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies { + title + actorsConnection(where: {edge: {NOT: {screenTime_EQ: 60}}}) { + edges { + properties { + screenTime + } + node { + name + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : 60 +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +CALL { + WITH this + MATCH (actor0:Actor)-[actedIn0:ACTED_IN]->(this) + WHERE NOT (actedIn0.screenTime = $param0) + WITH collect( { + node: actor0, + relationship: actedIn0 + }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS actor0, edge.relationship AS actedIn0 + RETURN collect( { + properties: { + __typename: 'ActedIn', + screenTime: actedIn0.screenTime + }, + node: { + __typename: 'Actor', + name: actor0.name + } + }) AS actorsConnectionEdges + } + RETURN { + edges: actorsConnectionEdges, + totalCount: totalCount + } AS actorsConnection +} +RETURN this { + .title, + actorsConnection: actorsConnection +} AS this +---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/equality.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/equality.js.adoc index ad8e6772..072ca7bd 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/equality.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/equality.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } @@ -32,7 +32,7 @@ type ActedIn @relationshipProperties { { movies { title - actorsConnection(where: {edge: {screenTime: 60}}) { + actorsConnection(where: {edge: {screenTime_EQ: 60}}) { edges { properties { screenTime @@ -74,3 +74,54 @@ CALL { } RETURN this { .title, actorsConnection: var3 } AS this ---- + +== Inequality + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies { + title + actorsConnection(where: {edge: {NOT: {screenTime_EQ: 60}}}) { + edges { + properties { + screenTime + } + node { + name + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": 60 +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +CALL { + WITH this + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) + WHERE NOT (this0.screenTime = $param0) + WITH collect({ node: this1, relationship: this0 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1, edge.relationship AS this0 + RETURN collect({ properties: { screenTime: this0.screenTime, __typename: "ActedIn" }, node: { name: this1.name, __typename: "Actor" } }) AS var2 + } + RETURN { edges: var2, totalCount: totalCount } AS var3 +} +RETURN this { .title, actorsConnection: var3 } AS this +---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/numerical.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/numerical.adoc index 972d636b..e9c3c065 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/numerical.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/numerical.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/numerical.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/numerical.js.adoc index 5bcbc67a..49d4bea7 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/numerical.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/numerical.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/or.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/or.adoc index 2991af1e..2f07da89 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/or.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/or.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } @@ -98,3 +98,40 @@ RETURN this { actorsConnection: actorsConnection } AS this ---- + +== OR between edge and node + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies( + where: {actorsConnection_SOME: {OR: [{node: {name_EQ: "Harry"}}, {edge: {role_EQ: "Tom"}}]}} + ) { + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Harry", + "param1" : "Tom" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE EXISTS { + MATCH (this0:Actor)-[edge0:ACTED_IN]->(this) + WHERE (this0.name = $param0 + OR edge0.role = $param1) +} +RETURN this { + .title +} AS this +---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/or.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/or.js.adoc index c2b90e40..1e2d3f1d 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/or.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/or.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } @@ -79,3 +79,37 @@ CALL { } RETURN this { .title, actorsConnection: var3 } AS this ---- + +== OR between edge and node + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies( + where: {actorsConnection_SOME: {OR: [{node: {name_EQ: "Harry"}}, {edge: {role_EQ: "Tom"}}]}} + ) { + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Harry", + "param1": "Tom" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE EXISTS { + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) + WHERE (this1.name = $param0 OR this0.role = $param1) +} +RETURN this { .title } AS this +---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/points.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/points.adoc index 2a934294..0afe6df9 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/points.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/points.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/points.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/points.js.adoc index f5dc064f..694794b0 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/points.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/points.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } @@ -81,10 +81,7 @@ CALL { WITH edges UNWIND edges AS edge WITH edge.node AS this1, edge.relationship AS this0 - RETURN collect({ properties: { screenTime: this0.screenTime, location: CASE - WHEN this0.location IS NOT NULL THEN { point: this0.location } - ELSE NULL - END, __typename: "ActedIn" }, node: { name: this1.name, __typename: "Actor" } }) AS var2 + RETURN collect({ properties: { screenTime: this0.screenTime, location: this0.location, __typename: "ActedIn" }, node: { name: this1.name, __typename: "Actor" } }) AS var2 } RETURN { edges: var2, totalCount: totalCount } AS var3 } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/string.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/string.adoc index 314d0c3c..08cb6918 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/string.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/string.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/string.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/string.js.adoc index af887726..d2e6a7ff 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/string.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/string.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/temporal.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/temporal.adoc index 6954154f..f96f8650 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/temporal.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/temporal.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/temporal.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/temporal.js.adoc index 56202512..bf0ec8f4 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/temporal.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/filtering/relationship/temporal.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/interfaces.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/interfaces.adoc index 033e8c35..3dc22af3 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/interfaces.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/interfaces.adoc @@ -12,12 +12,12 @@ interface Production { title: String! } -type Movie implements Production { +type Movie implements Production @node { title: String! runtime: Int! } -type Series implements Production { +type Series implements Production @node { title: String! episodes: Int! } @@ -26,7 +26,7 @@ type ActedIn @relationshipProperties { screenTime: Int! } -type Actor { +type Actor @node { name: String! actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/interfaces.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/interfaces.js.adoc index 9d2b49a7..15d7201a 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/interfaces.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/interfaces.js.adoc @@ -13,12 +13,12 @@ interface Production { title: String! } -type Movie implements Production { +type Movie implements Production @node { title: String! runtime: Int! } -type Series implements Production { +type Series implements Production @node { title: String! episodes: Int! } @@ -27,7 +27,7 @@ type ActedIn @relationshipProperties { screenTime: Int! } -type Actor { +type Actor @node { name: String! actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/mixed-nesting.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/mixed-nesting.adoc new file mode 100644 index 00000000..a0048b24 --- /dev/null +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/mixed-nesting.adoc @@ -0,0 +1,313 @@ +:toc: +:toclevels: 42 + += Mixed nesting + +== Setup + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + title: String! + actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) +} + +type Actor @node { + name: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) +} + +type ActedIn @relationshipProperties { + screenTime: Int! +} +---- + +== Connection -> Relationship + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {title_EQ: "Forrest Gump"}) { + title + actorsConnection(where: {node: {name_EQ: "Tom Hanks"}}) { + edges { + properties { + screenTime + } + node { + name + movies(where: {NOT: {title_EQ: "Forrest Gump"}}) { + title + } + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Forrest Gump", + "param1" : "Tom Hanks", + "param2" : "Forrest Gump" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.title = $param0 +CALL { + WITH this + MATCH (actor0:Actor)-[actedIn0:ACTED_IN]->(this) + WHERE actor0.name = $param1 + WITH collect( { + node: actor0, + relationship: actedIn0 + }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS actor0, edge.relationship AS actedIn0 + CALL { + WITH actor0 + MATCH (actor0)-[actedIn1:ACTED_IN]->(movie0:Movie) + WHERE NOT (movie0.title = $param2) + WITH movie0 { + .title + } AS movies + RETURN collect(movies) AS movies + } + RETURN collect( { + properties: { + __typename: 'ActedIn', + screenTime: actedIn0.screenTime + }, + node: { + __typename: 'Actor', + name: actor0.name, + movies: movies + } + }) AS actorsConnectionEdges + } + RETURN { + edges: actorsConnectionEdges, + totalCount: totalCount + } AS actorsConnection +} +RETURN this { + .title, + actorsConnection: actorsConnection +} AS this +---- + +== Connection -> Connection -> Relationship + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {title_EQ: "Forrest Gump"}) { + title + actorsConnection(where: {node: {name_EQ: "Tom Hanks"}}) { + edges { + properties { + screenTime + } + node { + name + moviesConnection(where: {node: {NOT: {title_EQ: "Forrest Gump"}}}) { + edges { + node { + title + actors(where: {NOT: {name_EQ: "Tom Hanks"}}) { + name + } + } + } + } + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Forrest Gump", + "param1" : "Tom Hanks", + "param2" : "Forrest Gump", + "param3" : "Tom Hanks" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.title = $param0 +CALL { + WITH this + MATCH (actor0:Actor)-[actedIn0:ACTED_IN]->(this) + WHERE actor0.name = $param1 + WITH collect( { + node: actor0, + relationship: actedIn0 + }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS actor0, edge.relationship AS actedIn0 + CALL { + WITH actor0 + MATCH (actor0)-[actedIn1:ACTED_IN]->(movie0:Movie) + WHERE NOT (movie0.title = $param2) + WITH collect( { + node: movie0, + relationship: actedIn1 + }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS movie0, edge.relationship AS actedIn1 + CALL { + WITH movie0 + MATCH (actor1:Actor)-[actedIn2:ACTED_IN]->(movie0) + WHERE NOT (actor1.name = $param3) + WITH actor1 { + .name + } AS actors + RETURN collect(actors) AS actors + } + RETURN collect( { + node: { + __typename: 'Movie', + title: movie0.title, + actors: actors + } + }) AS moviesConnectionEdges + } + RETURN { + edges: moviesConnectionEdges, + totalCount: totalCount + } AS moviesConnection + } + RETURN collect( { + properties: { + __typename: 'ActedIn', + screenTime: actedIn0.screenTime + }, + node: { + __typename: 'Actor', + name: actor0.name, + moviesConnection: moviesConnection + } + }) AS actorsConnectionEdges + } + RETURN { + edges: actorsConnectionEdges, + totalCount: totalCount + } AS actorsConnection +} +RETURN this { + .title, + actorsConnection: actorsConnection +} AS this +---- + +== Relationship -> Connection + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {title_EQ: "Forrest Gump"}) { + title + actors(where: {name_EQ: "Tom Hanks"}) { + name + moviesConnection(where: {node: {NOT: {title_EQ: "Forrest Gump"}}}) { + edges { + properties { + screenTime + } + node { + title + } + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Forrest Gump", + "param1" : "Forrest Gump", + "param2" : "Tom Hanks" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.title = $param0 +CALL { + WITH this + MATCH (actor0:Actor)-[actedIn0:ACTED_IN]->(this) + WHERE actor0.name = $param2 + CALL { + WITH actor0 + MATCH (actor0)-[actedIn1:ACTED_IN]->(movie0:Movie) + WHERE NOT (movie0.title = $param1) + WITH collect( { + node: movie0, + relationship: actedIn1 + }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS movie0, edge.relationship AS actedIn1 + RETURN collect( { + properties: { + __typename: 'ActedIn', + screenTime: actedIn1.screenTime + }, + node: { + __typename: 'Movie', + title: movie0.title + } + }) AS moviesConnectionEdges + } + RETURN { + edges: moviesConnectionEdges, + totalCount: totalCount + } AS moviesConnection + } + WITH actor0 { + .name, + moviesConnection: moviesConnection + } AS actors + RETURN collect(actors) AS actors +} +RETURN this { + .title, + actors: actors +} AS this +---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/mixed-nesting.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/mixed-nesting.js.adoc new file mode 100644 index 00000000..d41fff74 --- /dev/null +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/mixed-nesting.js.adoc @@ -0,0 +1,239 @@ +// This file was generated by the Test-Case extractor of neo4j-graphql +:toc: +:toclevels: 42 + += Mixed nesting + +== Setup + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + title: String! + actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) +} + +type Actor @node { + name: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) +} + +type ActedIn @relationshipProperties { + screenTime: Int! +} +---- + +== Connection -> Relationship + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {title_EQ: "Forrest Gump"}) { + title + actorsConnection(where: {node: {name_EQ: "Tom Hanks"}}) { + edges { + properties { + screenTime + } + node { + name + movies(where: {NOT: {title_EQ: "Forrest Gump"}}) { + title + } + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Forrest Gump", + "param1": "Tom Hanks", + "param2": "Forrest Gump" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.title = $param0 +CALL { + WITH this + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) + WHERE this1.name = $param1 + WITH collect({ node: this1, relationship: this0 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1, edge.relationship AS this0 + CALL { + WITH this1 + MATCH (this1)-[this2:ACTED_IN]->(this3:Movie) + WHERE NOT (this3.title = $param2) + WITH this3 { .title } AS this3 + RETURN collect(this3) AS var4 + } + RETURN collect({ properties: { screenTime: this0.screenTime, __typename: "ActedIn" }, node: { name: this1.name, movies: var4, __typename: "Actor" } }) AS var5 + } + RETURN { edges: var5, totalCount: totalCount } AS var6 +} +RETURN this { .title, actorsConnection: var6 } AS this +---- + +== Connection -> Connection -> Relationship + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {title_EQ: "Forrest Gump"}) { + title + actorsConnection(where: {node: {name_EQ: "Tom Hanks"}}) { + edges { + properties { + screenTime + } + node { + name + moviesConnection(where: {node: {NOT: {title_EQ: "Forrest Gump"}}}) { + edges { + node { + title + actors(where: {NOT: {name_EQ: "Tom Hanks"}}) { + name + } + } + } + } + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Forrest Gump", + "param1": "Tom Hanks", + "param2": "Forrest Gump", + "param3": "Tom Hanks" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.title = $param0 +CALL { + WITH this + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) + WHERE this1.name = $param1 + WITH collect({ node: this1, relationship: this0 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1, edge.relationship AS this0 + CALL { + WITH this1 + MATCH (this1)-[this2:ACTED_IN]->(this3:Movie) + WHERE NOT (this3.title = $param2) + WITH collect({ node: this3, relationship: this2 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this3, edge.relationship AS this2 + CALL { + WITH this3 + MATCH (this3)<-[this4:ACTED_IN]-(this5:Actor) + WHERE NOT (this5.name = $param3) + WITH this5 { .name } AS this5 + RETURN collect(this5) AS var6 + } + RETURN collect({ node: { title: this3.title, actors: var6, __typename: "Movie" } }) AS var7 + } + RETURN { edges: var7, totalCount: totalCount } AS var8 + } + RETURN collect({ properties: { screenTime: this0.screenTime, __typename: "ActedIn" }, node: { name: this1.name, moviesConnection: var8, __typename: "Actor" } }) AS var9 + } + RETURN { edges: var9, totalCount: totalCount } AS var10 +} +RETURN this { .title, actorsConnection: var10 } AS this +---- + +== Relationship -> Connection + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {title_EQ: "Forrest Gump"}) { + title + actors(where: {name_EQ: "Tom Hanks"}) { + name + moviesConnection(where: {node: {NOT: {title_EQ: "Forrest Gump"}}}) { + edges { + properties { + screenTime + } + node { + title + } + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Forrest Gump", + "param1": "Tom Hanks", + "param2": "Forrest Gump" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.title = $param0 +CALL { + WITH this + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) + WHERE this1.name = $param1 + CALL { + WITH this1 + MATCH (this1)-[this2:ACTED_IN]->(this3:Movie) + WHERE NOT (this3.title = $param2) + WITH collect({ node: this3, relationship: this2 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this3, edge.relationship AS this2 + RETURN collect({ properties: { screenTime: this2.screenTime, __typename: "ActedIn" }, node: { title: this3.title, __typename: "Movie" } }) AS var4 + } + RETURN { edges: var4, totalCount: totalCount } AS var5 + } + WITH this1 { .name, moviesConnection: var5 } AS this1 + RETURN collect(this1) AS var6 +} +RETURN this { .title, actors: var6 } AS this +---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/projections/projections.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/projections/projections.adoc index 09d76ff6..77d3d879 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/projections/projections.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/projections/projections.adoc @@ -10,17 +10,17 @@ ---- union Production = Movie | Series -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Series { +type Series @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! productions: [Production!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -32,7 +32,7 @@ type Actor { [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title actorsConnection { totalCount @@ -90,7 +90,7 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title actorsConnection { pageInfo { @@ -153,7 +153,7 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title actorsConnection(first: 5) { totalCount @@ -212,7 +212,7 @@ RETURN this { [source,graphql,request=true] ---- { - actors(where: {name: "Tom Hanks"}) { + actors(where: {name_EQ: "Tom Hanks"}) { name productionsConnection { totalCount @@ -275,7 +275,7 @@ RETURN this { [source,graphql,request=true] ---- { - actors(where: {name: "Tom Hanks"}) { + actors(where: {name_EQ: "Tom Hanks"}) { name productionsConnection { pageInfo { @@ -343,7 +343,7 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title actorsConnection { totalCount @@ -406,7 +406,7 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title actorsConnection(first: 5) { totalCount diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/projections/projections.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/projections/projections.js.adoc index e4057bc3..767ed884 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/projections/projections.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/projections/projections.js.adoc @@ -11,17 +11,17 @@ ---- union Production = Movie | Series -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Series { +type Series @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! productions: [Production!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -33,7 +33,7 @@ type Actor { [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title actorsConnection { totalCount @@ -77,7 +77,7 @@ RETURN this { .title, actorsConnection: var3 } AS this [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title actorsConnection { pageInfo { @@ -126,7 +126,7 @@ RETURN this { .title, actorsConnection: var3 } AS this [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title actorsConnection(first: 5) { totalCount @@ -174,7 +174,7 @@ RETURN this { .title, actorsConnection: var3 } AS this [source,graphql,request=true] ---- { - actors(where: {name: "Tom Hanks"}) { + actors(where: {name_EQ: "Tom Hanks"}) { name productionsConnection { totalCount @@ -222,7 +222,7 @@ RETURN this { .name, productionsConnection: var4 } AS this [source,graphql,request=true] ---- { - actors(where: {name: "Tom Hanks"}) { + actors(where: {name_EQ: "Tom Hanks"}) { name productionsConnection { pageInfo { @@ -275,7 +275,7 @@ RETURN this { .name, productionsConnection: var4 } AS this [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title actorsConnection { totalCount @@ -324,7 +324,7 @@ RETURN this { .title, actorsConnection: var3 } AS this [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title actorsConnection(first: 5) { totalCount diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/relationship-properties.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/relationship-properties.adoc index bc0b66be..960ecb2a 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/relationship-properties.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/relationship-properties.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } @@ -30,7 +30,7 @@ type ActedIn @relationshipProperties { [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title actorsConnection { edges { @@ -99,9 +99,9 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title - actorsConnection(where: {node: {name: "Tom Hanks"}}) { + actorsConnection(where: {node: {name_EQ: "Tom Hanks"}}) { edges { properties { screenTime @@ -170,7 +170,7 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title actorsConnection(sort: {edge: {screenTime: DESC}}) { edges { @@ -367,7 +367,7 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title actorsConnection { edges { @@ -475,7 +475,7 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title actorsConnection { edges { diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/relationship-properties.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/relationship-properties.js.adoc index bd1b54ed..78da0040 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/relationship-properties.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/relationship-properties.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } @@ -31,7 +31,7 @@ type ActedIn @relationshipProperties { [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title actorsConnection { edges { @@ -82,9 +82,9 @@ RETURN this { .title, actorsConnection: var3 } AS this [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title - actorsConnection(where: {node: {name: "Tom Hanks"}}) { + actorsConnection(where: {node: {name_EQ: "Tom Hanks"}}) { edges { properties { screenTime @@ -135,7 +135,7 @@ RETURN this { .title, actorsConnection: var3 } AS this [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title actorsConnection(sort: {edge: {screenTime: DESC}}) { edges { @@ -286,7 +286,7 @@ RETURN this { actorsConnection: var3 } AS this [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title actorsConnection { edges { @@ -360,7 +360,7 @@ RETURN this { .title, actorsConnection: var7 } AS this [source,graphql,request=true] ---- { - movies(where: {title: "Forrest Gump"}) { + movies(where: {title_EQ: "Forrest Gump"}) { title actorsConnection { edges { diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/unions.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/unions.adoc index 57b81657..ecd5fa1a 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/unions.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/unions.adoc @@ -10,17 +10,17 @@ ---- union Publication = Book | Journal -type Author { +type Author @node { name: String! publications: [Publication!]! @relationship(type: "WROTE", direction: OUT, properties: "Wrote") } -type Book { +type Book @node { title: String! author: [Author!]! @relationship(type: "WROTE", direction: IN, properties: "Wrote") } -type Journal { +type Journal @node { subject: String! author: [Author!]! @relationship(type: "WROTE", direction: IN, properties: "Wrote") } @@ -121,7 +121,7 @@ RETURN this { authors { name publicationsConnection( - where: {Book: {node: {title: "Book Title"}}, Journal: {node: {subject: "Journal Subject"}}} + where: {Book: {node: {title_EQ: "Book Title"}}, Journal: {node: {subject_EQ: "Journal Subject"}}} ) { edges { properties { @@ -210,7 +210,7 @@ RETURN this { authors { name publicationsConnection( - where: {Book: {edge: {words: 1000}}, Journal: {edge: {words: 2000}}} + where: {Book: {edge: {words_EQ: 1000}}, Journal: {edge: {words_EQ: 2000}}} ) { edges { properties { @@ -299,7 +299,7 @@ RETURN this { authors { name publicationsConnection( - where: {Book: {edge: {words: 1000}, node: {title: "Book Title"}}, Journal: {edge: {words: 2000}, node: {subject: "Journal Subject"}}} + where: {Book: {edge: {words_EQ: 1000}, node: {title_EQ: "Book Title"}}, Journal: {edge: {words_EQ: 2000}, node: {subject_EQ: "Journal Subject"}}} ) { edges { properties { diff --git a/core/src/test/resources/tck-test-files/cypher/v2/connections/unions.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/connections/unions.js.adoc index 5a5fc9d3..fa1f54c4 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/connections/unions.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/connections/unions.js.adoc @@ -11,17 +11,17 @@ ---- union Publication = Book | Journal -type Author { +type Author @node { name: String! publications: [Publication!]! @relationship(type: "WROTE", direction: OUT, properties: "Wrote") } -type Book { +type Book @node { title: String! author: [Author!]! @relationship(type: "WROTE", direction: IN, properties: "Wrote") } -type Journal { +type Journal @node { subject: String! author: [Author!]! @relationship(type: "WROTE", direction: IN, properties: "Wrote") } @@ -97,7 +97,7 @@ RETURN this { .name, publicationsConnection: var4 } AS this authors { name publicationsConnection( - where: {Book: {node: {title: "Book Title"}}, Journal: {node: {subject: "Journal Subject"}}} + where: {Book: {node: {title_EQ: "Book Title"}}, Journal: {node: {subject_EQ: "Journal Subject"}}} ) { edges { properties { @@ -161,7 +161,7 @@ RETURN this { .name, publicationsConnection: var4 } AS this authors { name publicationsConnection( - where: {Book: {edge: {words: 1000}}, Journal: {edge: {words: 2000}}} + where: {Book: {edge: {words_EQ: 1000}}, Journal: {edge: {words_EQ: 2000}}} ) { edges { properties { @@ -225,7 +225,7 @@ RETURN this { .name, publicationsConnection: var4 } AS this authors { name publicationsConnection( - where: {Book: {edge: {words: 1000}, node: {title: "Book Title"}}, Journal: {edge: {words: 2000}, node: {subject: "Journal Subject"}}} + where: {Book: {edge: {words_EQ: 1000}, node: {title_EQ: "Book Title"}}, Journal: {edge: {words_EQ: 2000}, node: {subject_EQ: "Journal Subject"}}} ) { edges { properties { diff --git a/core/src/test/resources/tck-test-files/cypher/v2/directives/alias.adoc b/core/src/test/resources/tck-test-files/cypher/v2/directives/alias.adoc index d9e68cd6..1680fffc 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/directives/alias.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/directives/alias.adoc @@ -8,13 +8,13 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String! city: String @alias(property: "cityPropInDb") actedIn: [Movie!]! @relationship(direction: OUT, type: "ACTED_IN", properties: "ActorActedInProps") } -type Movie { +type Movie @node { title: String! rating: Float @alias(property: "ratingPropInDb") } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/directives/alias.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/directives/alias.js.adoc index ff339f99..32ef8dea 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/directives/alias.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/directives/alias.js.adoc @@ -9,13 +9,13 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String! city: String @alias(property: "cityPropInDb") actedIn: [Movie!]! @relationship(direction: OUT, type: "ACTED_IN", properties: "ActorActedInProps") } -type Movie { +type Movie @node { title: String! rating: Float @alias(property: "ratingPropInDb") } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/directives/coalesce.adoc b/core/src/test/resources/tck-test-files/cypher/v2/directives/coalesce.adoc index 7cdf7ec3..ae05563d 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/directives/coalesce.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/directives/coalesce.adoc @@ -13,7 +13,7 @@ enum Status { INACTIVE } -type Movie { +type Movie @node { id: ID status: Status @coalesce(value: ACTIVE) } @@ -37,7 +37,7 @@ type Movie { [source,graphql,request=true] ---- { - movies(where: {status: ACTIVE}) { + movies(where: {status_EQ: ACTIVE}) { id status } @@ -73,12 +73,12 @@ enum Status { INACTIVE } -type Movie { +type Movie @node { id: ID status: Status @coalesce(value: ACTIVE) } -type Actor { +type Actor @node { movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } ---- @@ -102,7 +102,7 @@ type Actor { ---- query Actors { actors { - moviesConnection(where: {node: {status: ACTIVE}}) { + moviesConnection(where: {node: {status_EQ: ACTIVE}}) { edges { node { id @@ -167,12 +167,12 @@ enum Status { INACTIVE } -type Movie { +type Movie @node { id: ID statuses: [Status!]! @coalesce(value: [ACTIVE, INACTIVE]) } -type Actor { +type Actor @node { movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } ---- @@ -182,7 +182,7 @@ type Actor { ---- query Actors { actors { - moviesConnection(where: {node: {statuses: [ACTIVE, INACTIVE]}}) { + moviesConnection(where: {node: {statuses_EQ: [ACTIVE, INACTIVE]}}) { edges { node { id @@ -236,3 +236,94 @@ RETURN this { moviesConnection: moviesConnection } AS this ---- + +== Simple coalesce + +.Schema +[source,graphql,schema=true] +---- +interface UserInterface { + fromInterface: String! + toBeOverridden: String! +} + +type User implements UserInterface @node { + id: ID! @coalesce(value: "00000000-00000000-00000000-00000000") + name: String! @coalesce(value: "Jane Smith") + verified: Boolean! @coalesce(value: false) + numberOfFriends: Int! @coalesce(value: 0) + rating: Float! @coalesce(value: 2.5) + fromInterface: String! + toBeOverridden: String! @coalesce(value: "Overridden") +} +---- + +.Configuration +[source,json,schema-config=true] +---- +{ + "features" : { + "filters" : { + "String" : { + "MATCHES" : true + } + } + } +} +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +query ($id: ID, $name: String, $verified: Boolean, $numberOfFriends: Int, $rating: Float, $fromInterface: String, $toBeOverridden: String) { + users( + where: {id_EQ: $id, name_MATCHES: $name, NOT: {verified_EQ: $verified}, numberOfFriends_GT: $numberOfFriends, rating_LT: $rating, fromInterface_EQ: $fromInterface, toBeOverridden_EQ: $toBeOverridden} + ) { + name + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "fromInterface" : "Some string", + "id" : "Some ID", + "name" : "Some name", + "numberOfFriends" : 10, + "rating" : 3.5, + "toBeOverridden" : "Some string", + "verified" : true +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : true, + "param1" : "Some ID", + "param2" : "Some name", + "param3" : 10, + "param4" : 3.5, + "param5" : "Some string", + "param6" : "Some string" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:User) +WHERE (NOT (coalesce(this.verified, false) = $param0) + AND coalesce(this.id, '00000000-00000000-00000000-00000000') = $param1 + AND coalesce(this.name, 'Jane Smith') =~ $param2 + AND coalesce(this.numberOfFriends, 0) > $param3 + AND coalesce(this.rating, 2.5) < $param4 + AND this.fromInterface = $param5 + AND coalesce(this.toBeOverridden, 'Overridden') = $param6) +RETURN this { + .name +} AS this +---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/directives/coalesce.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/directives/coalesce.js.adoc index e36731d7..dfa9ddae 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/directives/coalesce.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/directives/coalesce.js.adoc @@ -4,6 +4,89 @@ = Cypher coalesce() +== Simple coalesce + +.Schema +[source,graphql,schema=true] +---- +interface UserInterface { + fromInterface: String! + toBeOverridden: String! +} + +type User implements UserInterface @node { + id: ID! @coalesce(value: "00000000-00000000-00000000-00000000") + name: String! @coalesce(value: "Jane Smith") + verified: Boolean! @coalesce(value: false) + numberOfFriends: Int! @coalesce(value: 0) + rating: Float! @coalesce(value: 2.5) + fromInterface: String! + toBeOverridden: String! @coalesce(value: "Overridden") +} +---- + +.Configuration +[source,json,schema-config=true] +---- +{ + "features": { + "filters": { + "String": { + "MATCHES": true + } + } + } +} +---- + +.GraphQL-Query +[source,graphql,request=true] +---- +query ($id: ID, $name: String, $verified: Boolean, $numberOfFriends: Int, $rating: Float, $fromInterface: String, $toBeOverridden: String) { + users( + where: {id_EQ: $id, name_MATCHES: $name, NOT: {verified_EQ: $verified}, numberOfFriends_GT: $numberOfFriends, rating_LT: $rating, fromInterface_EQ: $fromInterface, toBeOverridden_EQ: $toBeOverridden} + ) { + name + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "id": "Some ID", + "name": "Some name", + "verified": true, + "numberOfFriends": 10, + "rating": 3.5, + "fromInterface": "Some string", + "toBeOverridden": "Some string" +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Some ID", + "param1": "Some name", + "param2": 10, + "param3": 3.5, + "param4": "Some string", + "param5": "Some string", + "param6": true +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:User) +WHERE (coalesce(this.id, "00000000-00000000-00000000-00000000") = $param0 AND coalesce(this.name, "Jane Smith") =~ $param1 AND coalesce(this.numberOfFriends, 0) > $param2 AND coalesce(this.rating, 2.5) < $param3 AND this.fromInterface = $param4 AND coalesce(this.toBeOverridden, "Overridden") = $param5 AND NOT (coalesce(this.verified, false) = $param6)) +RETURN this { .name } AS this +---- + == Coalesce with enum in match .Schema @@ -14,7 +97,7 @@ enum Status { INACTIVE } -type Movie { +type Movie @node { id: ID status: Status @coalesce(value: ACTIVE) } @@ -38,7 +121,7 @@ type Movie { [source,graphql,request=true] ---- { - movies(where: {status: ACTIVE}) { + movies(where: {status_EQ: ACTIVE}) { id status } @@ -71,12 +154,12 @@ enum Status { INACTIVE } -type Movie { +type Movie @node { id: ID status: Status @coalesce(value: ACTIVE) } -type Actor { +type Actor @node { movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } ---- @@ -100,7 +183,7 @@ type Actor { ---- query Actors { actors { - moviesConnection(where: {node: {status: ACTIVE}}) { + moviesConnection(where: {node: {status_EQ: ACTIVE}}) { edges { node { id @@ -151,12 +234,12 @@ enum Status { INACTIVE } -type Movie { +type Movie @node { id: ID statuses: [Status!]! @coalesce(value: [ACTIVE, INACTIVE]) } -type Actor { +type Actor @node { movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } ---- @@ -166,7 +249,7 @@ type Actor { ---- query Actors { actors { - moviesConnection(where: {node: {statuses: [ACTIVE, INACTIVE]}}) { + moviesConnection(where: {node: {statuses_EQ: [ACTIVE, INACTIVE]}}) { edges { node { id diff --git a/core/src/test/resources/tck-test-files/cypher/v2/directives/customResolver.adoc b/core/src/test/resources/tck-test-files/cypher/v2/directives/customResolver.adoc index fba761cd..70bcccdb 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/directives/customResolver.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/directives/customResolver.adoc @@ -10,7 +10,7 @@ .Schema [source,graphql,schema=true] ---- -type User { +type User @node { firstName: String! lastName: String! fullName: String! @customResolver(requires: "firstName lastName") @@ -138,7 +138,7 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type User { +type User @node { firstName: String! lastName: String! fullName: String! @customResolver @@ -206,17 +206,17 @@ RETURN this { .Schema [source,graphql,schema=true] ---- -type City { +type City @node { name: String! population: Int } -type Address { +type Address @node { street: String! city: City! @relationship(type: "IN_CITY", direction: OUT) } -type User { +type User @node { id: ID! firstName: String! lastName: String! @@ -413,18 +413,18 @@ RETURN this { ---- union Publication = Book | Journal -type Author { +type Author @node { name: String! publications: [Publication!]! @relationship(type: "WROTE", direction: OUT) publicationsWithAuthor: [String!]! @customResolver(requires: "name publications { ...on Book { title } ... on Journal { subject } }") } -type Book { +type Book @node { title: String! author: Author! @relationship(type: "WROTE", direction: IN) } -type Journal { +type Journal @node { subject: String! author: Author! @relationship(type: "WROTE", direction: IN) } @@ -635,19 +635,19 @@ interface Publication { publicationYear: Int! } -type Author { +type Author @node { name: String! publications: [Publication!]! @relationship(type: "WROTE", direction: OUT) publicationsWithAuthor: [String!]! @customResolver(requires: "name publications { publicationYear ...on Book { title } ... on Journal { subject } }") } -type Book implements Publication { +type Book implements Publication @node { title: String! publicationYear: Int! author: [Author!]! @relationship(type: "WROTE", direction: IN) } -type Journal implements Publication { +type Journal implements Publication @node { subject: String! publicationYear: Int! author: [Author!]! @relationship(type: "WROTE", direction: IN) diff --git a/core/src/test/resources/tck-test-files/cypher/v2/directives/customResolver.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/directives/customResolver.js.adoc index e1d7e643..e9aa056f 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/directives/customResolver.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/directives/customResolver.js.adoc @@ -11,7 +11,7 @@ .Schema [source,graphql,schema=true] ---- -type User { +type User @node { firstName: String! lastName: String! fullName: String! @customResolver(requires: "firstName lastName") @@ -67,7 +67,7 @@ RETURN this { .firstName } AS this [source,cypher] ---- MATCH (this:User) -RETURN this { .firstName, .lastName, .fullName } AS this +RETURN this { .firstName, .lastName } AS this ---- === should not over fetch when some required fields are manually selected @@ -93,7 +93,7 @@ RETURN this { .firstName, .lastName, .fullName } AS this [source,cypher] ---- MATCH (this:User) -RETURN this { .firstName, .fullName, .lastName } AS this +RETURN this { .firstName, .lastName } AS this ---- === should not over fetch when no required fields are manually selected @@ -118,7 +118,7 @@ RETURN this { .firstName, .fullName, .lastName } AS this [source,cypher] ---- MATCH (this:User) -RETURN this { .fullName, .firstName, .lastName } AS this +RETURN this { .firstName, .lastName } AS this ---- == No required fields @@ -128,7 +128,7 @@ RETURN this { .fullName, .firstName, .lastName } AS this .Schema [source,graphql,schema=true] ---- -type User { +type User @node { firstName: String! lastName: String! fullName: String! @customResolver @@ -158,7 +158,7 @@ type User { [source,cypher] ---- MATCH (this:User) -RETURN this { .firstName, .fullName } AS this +RETURN this { .firstName } AS this ---- === should not over fetch when no other fields are manually selected @@ -183,7 +183,7 @@ RETURN this { .firstName, .fullName } AS this [source,cypher] ---- MATCH (this:User) -RETURN this { .fullName } AS this +RETURN this { } AS this ---- == Require fields on nested types @@ -193,17 +193,17 @@ RETURN this { .fullName } AS this .Schema [source,graphql,schema=true] ---- -type City { +type City @node { name: String! population: Int } -type Address { +type Address @node { street: String! city: City! @relationship(type: "IN_CITY", direction: OUT) } -type User { +type User @node { id: ID! firstName: String! lastName: String! @@ -254,7 +254,7 @@ CALL { WITH this1 { city: var4 } AS this1 RETURN head(collect(this1)) AS var5 } -RETURN this { .firstName, .lastName, .fullName, address: var5 } AS this +RETURN this { .firstName, .lastName, address: var5 } AS this ---- === should not fetch required fields if @customResolver field is not selected @@ -322,7 +322,7 @@ CALL { WITH this1 { city: var4 } AS this1 RETURN head(collect(this1)) AS var5 } -RETURN this { .lastName, .fullName, .firstName, address: var5 } AS this +RETURN this { .lastName, .firstName, address: var5 } AS this ---- === should not over fetch when no required fields are manually selected @@ -359,7 +359,7 @@ CALL { WITH this1 { city: var4 } AS this1 RETURN head(collect(this1)) AS var5 } -RETURN this { .fullName, .firstName, .lastName, address: var5 } AS this +RETURN this { .firstName, .lastName, address: var5 } AS this ---- == Require fields on nested unions @@ -371,18 +371,18 @@ RETURN this { .fullName, .firstName, .lastName, address: var5 } AS this ---- union Publication = Book | Journal -type Author { +type Author @node { name: String! publications: [Publication!]! @relationship(type: "WROTE", direction: OUT) publicationsWithAuthor: [String!]! @customResolver(requires: "name publications { ...on Book { title } ... on Journal { subject } }") } -type Book { +type Book @node { title: String! author: Author! @relationship(type: "WROTE", direction: IN) } -type Journal { +type Journal @node { subject: String! author: Author! @relationship(type: "WROTE", direction: IN) } @@ -435,7 +435,7 @@ CALL { WITH var2 RETURN collect(var2) AS var2 } -RETURN this { .name, .publicationsWithAuthor, publications: var2 } AS this +RETURN this { .name, publications: var2 } AS this ---- === should not fetch required fields if @customResolver field is not selected @@ -506,7 +506,7 @@ CALL { WITH var2 RETURN collect(var2) AS var2 } -RETURN this { .publicationsWithAuthor, .name, publications: var2 } AS this +RETURN this { .name, publications: var2 } AS this ---- === should not over fetch when no required fields are manually selected @@ -547,7 +547,7 @@ CALL { WITH var2 RETURN collect(var2) AS var2 } -RETURN this { .publicationsWithAuthor, .name, publications: var2 } AS this +RETURN this { .name, publications: var2 } AS this ---- == Require fields on nested interfaces @@ -561,19 +561,19 @@ interface Publication { publicationYear: Int! } -type Author { +type Author @node { name: String! publications: [Publication!]! @relationship(type: "WROTE", direction: OUT) publicationsWithAuthor: [String!]! @customResolver(requires: "name publications { publicationYear ...on Book { title } ... on Journal { subject } }") } -type Book implements Publication { +type Book implements Publication @node { title: String! publicationYear: Int! author: [Author!]! @relationship(type: "WROTE", direction: IN) } -type Journal implements Publication { +type Journal implements Publication @node { subject: String! publicationYear: Int! author: [Author!]! @relationship(type: "WROTE", direction: IN) @@ -628,7 +628,7 @@ CALL { WITH var2 RETURN collect(var2) AS var2 } -RETURN this { .name, .publicationsWithAuthor, publications: var2 } AS this +RETURN this { .name, publications: var2 } AS this ---- === should not fetch required fields if @customResolver field is not selected @@ -699,7 +699,7 @@ CALL { WITH var2 RETURN collect(var2) AS var2 } -RETURN this { .publicationsWithAuthor, .name, publications: var2 } AS this +RETURN this { .name, publications: var2 } AS this ---- === should not over fetch when no required fields are manually selected @@ -740,5 +740,5 @@ CALL { WITH var2 RETURN collect(var2) AS var2 } -RETURN this { .publicationsWithAuthor, .name, publications: var2 } AS this +RETURN this { .name, publications: var2 } AS this ---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/directives/interface-relationships/read.adoc b/core/src/test/resources/tck-test-files/cypher/v2/directives/interface-relationships/read.adoc index 66a5a8e8..42ca85cc 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/directives/interface-relationships/read.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/directives/interface-relationships/read.adoc @@ -12,12 +12,12 @@ interface Production { title: String! } -type Movie implements Production { +type Movie implements Production @node { title: String! runtime: Int! } -type Series implements Production { +type Series implements Production @node { title: String! episodes: Int! } @@ -26,7 +26,7 @@ type ActedIn @relationshipProperties { screenTime: Int! } -type Actor { +type Actor @node { name: String! currentlyActingIn: Production @relationship(type: "CURRENTLY_ACTING_IN", direction: OUT) actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") @@ -160,7 +160,7 @@ RETURN this { ---- { actors { - actedIn(options: {offset: 5, limit: 10, sort: [{title: DESC}]}) { + actedIn(offset: 5, limit: 10, sort: [{title: DESC}]) { title ... on Movie { runtime diff --git a/core/src/test/resources/tck-test-files/cypher/v2/directives/interface-relationships/read.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/directives/interface-relationships/read.js.adoc index f56694e0..8ee03a95 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/directives/interface-relationships/read.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/directives/interface-relationships/read.js.adoc @@ -13,12 +13,12 @@ interface Production { title: String! } -type Movie implements Production { +type Movie implements Production @node { title: String! runtime: Int! } -type Series implements Production { +type Series implements Production @node { title: String! episodes: Int! } @@ -27,7 +27,7 @@ type ActedIn @relationshipProperties { screenTime: Int! } -type Actor { +type Actor @node { name: String! currentlyActingIn: Production @relationship(type: "CURRENTLY_ACTING_IN", direction: OUT) actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") @@ -139,7 +139,7 @@ RETURN this { currentlyActingIn: var2 } AS this ---- { actors { - actedIn(options: {offset: 5, limit: 10, sort: [{title: DESC}]}) { + actedIn(offset: 5, limit: 10, sort: [{title: DESC}]) { title ... on Movie { runtime diff --git a/core/src/test/resources/tck-test-files/cypher/v2/directives/node/node-label-interface.adoc b/core/src/test/resources/tck-test-files/cypher/v2/directives/node/node-label-interface.adoc index 1c6bd043..dd54736a 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/directives/node/node-label-interface.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/directives/node/node-label-interface.adoc @@ -29,8 +29,8 @@ type Movie implements Search @node(labels: ["Film"]) { [source,graphql,request=true] ---- { - movies(where: {title: "some title"}) { - search(where: {name: "Horror"}, options: {offset: 1, limit: 10}) { + movies(where: {title_EQ: "some title"}) { + search(where: {name_EQ: "Horror"}, offset: 1, limit: 10) { ... on Movie { title } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/directives/node/node-label-interface.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/directives/node/node-label-interface.js.adoc index 09d675d9..3700f5ef 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/directives/node/node-label-interface.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/directives/node/node-label-interface.js.adoc @@ -30,8 +30,8 @@ type Movie implements Search @node(labels: ["Film"]) { [source,graphql,request=true] ---- { - movies(where: {title: "some title"}) { - search(where: {name: "Horror"}, options: {offset: 1, limit: 10}) { + movies(where: {title_EQ: "some title"}) { + search(where: {name_EQ: "Horror"}, offset: 1, limit: 10) { ... on Movie { title } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/directives/node/node-label-union.adoc b/core/src/test/resources/tck-test-files/cypher/v2/directives/node/node-label-union.adoc index c526f58b..f8716c47 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/directives/node/node-label-union.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/directives/node/node-label-union.adoc @@ -26,10 +26,11 @@ type Movie @node(labels: ["Film"]) { [source,graphql,request=true] ---- { - movies(where: {title: "some title"}) { + movies(where: {title_EQ: "some title"}) { search( - where: {Movie: {title: "The Matrix"}, Genre: {name: "Horror"}} - options: {offset: 1, limit: 10} + where: {Movie: {title_EQ: "The Matrix"}, Genre: {name_EQ: "Horror"}} + offset: 1 + limit: 10 ) { ... on Movie { title diff --git a/core/src/test/resources/tck-test-files/cypher/v2/directives/node/node-label-union.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/directives/node/node-label-union.js.adoc index b09f533a..80c1bdbb 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/directives/node/node-label-union.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/directives/node/node-label-union.js.adoc @@ -27,10 +27,11 @@ type Movie @node(labels: ["Film"]) { [source,graphql,request=true] ---- { - movies(where: {title: "some title"}) { + movies(where: {title_EQ: "some title"}) { search( - where: {Movie: {title: "The Matrix"}, Genre: {name: "Horror"}} - options: {offset: 1, limit: 10} + where: {Movie: {title_EQ: "The Matrix"}, Genre: {name_EQ: "Horror"}} + offset: 1 + limit: 10 ) { ... on Movie { title diff --git a/core/src/test/resources/tck-test-files/cypher/v2/directives/plural.adoc b/core/src/test/resources/tck-test-files/cypher/v2/directives/plural.adoc index 8b6168e1..e400d5d2 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/directives/plural.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/directives/plural.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Tech @plural(value: "Techs") { +type Tech @plural(value: "Techs") @node { name: String } ---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/directives/plural.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/directives/plural.js.adoc index 728e7ff4..62178eed 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/directives/plural.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/directives/plural.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Tech @plural(value: "Techs") { +type Tech @plural(value: "Techs") @node { name: String } ---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/experimental/typename-in.adoc b/core/src/test/resources/tck-test-files/cypher/v2/experimental/typename-in.adoc deleted file mode 100644 index 2d217d2e..00000000 --- a/core/src/test/resources/tck-test-files/cypher/v2/experimental/typename-in.adoc +++ /dev/null @@ -1,254 +0,0 @@ -:toc: -:toclevels: 42 - -= typename_IN - -== Setup - -.Schema -[source,graphql,schema=true] ----- -interface Production { - title: String! - cost: Float! -} - -type Movie implements Production { - title: String! - cost: Float! - runtime: Int! -} - -type Series implements Production { - title: String! - cost: Float! - episodes: Int! -} - -type Cartoon implements Production { - title: String! - cost: Float! - cartoonist: String! -} - -type ActedIn @relationshipProperties { - screenTime: Int! -} - -type Actor { - name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") -} ----- - -== top-level - -.GraphQL-Query -[source,graphql,request=true] ----- -{ - productions( - where: {OR: [{AND: [{title: "The Matrix"}, {typename_IN: [Series]}]}, {typename_IN: [Movie]}]} - ) { - title - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ - "param0" : "The Matrix", - "param1" : "The Matrix", - "param2" : "The Matrix" -} ----- - -.Expected Cypher output -[source,cypher] ----- -CALL { - MATCH (cartoon0:Cartoon) - WHERE ((cartoon0.title = $param0 - AND cartoon0:Series) - OR cartoon0:Movie) - WITH cartoon0 { - __typename: 'Cartoon', - __id: elementId(cartoon0), - .title - } AS cartoon0 - RETURN cartoon0 AS this UNION - MATCH (movie0:Movie) - WHERE ((movie0.title = $param1 - AND movie0:Series) - OR movie0:Movie) - WITH movie0 { - __typename: 'Movie', - __id: elementId(movie0), - .title - } AS movie0 - RETURN movie0 AS this UNION - MATCH (series0:Series) - WHERE ((series0.title = $param2 - AND series0:Series) - OR series0:Movie) - WITH series0 { - __typename: 'Series', - __id: elementId(series0), - .title - } AS series0 - RETURN series0 AS this -} -WITH this -RETURN this AS this ----- - -== top-level + connection where - -.GraphQL-Query -[source,graphql,request=true] ----- -{ - actors( - where: {actedInConnection_SOME: {OR: [{edge: {screenTime: 2}}, {node: {OR: [{title: "The Matrix"}, {typename_IN: [Series]}]}}]}} - ) { - actedIn { - title - } - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ - "param0" : 2, - "param1" : "The Matrix" -} ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:Actor) -WHERE EXISTS { - MATCH (this)-[edge:ACTED_IN]->(this0) - WHERE ((edge.screenTime = $param0 - OR this0.title = $param1 - OR this0:Series) - AND (this0:Cartoon - OR this0:Movie - OR this0:Series)) -} -CALL { - WITH this - CALL { - WITH * - MATCH (this)-[actedIn0:ACTED_IN]->(cartoon0:Cartoon) - WITH cartoon0 { - __typename: 'Cartoon', - __id: elementId(cartoon0), - .title - } AS cartoon0 - RETURN cartoon0 AS actedIn UNION - WITH * - MATCH (this)-[actedIn1:ACTED_IN]->(movie0:Movie) - WITH movie0 { - __typename: 'Movie', - __id: elementId(movie0), - .title - } AS movie0 - RETURN movie0 AS actedIn UNION - WITH * - MATCH (this)-[actedIn2:ACTED_IN]->(series0:Series) - WITH series0 { - __typename: 'Series', - __id: elementId(series0), - .title - } AS series0 - RETURN series0 AS actedIn - } - WITH actedIn - RETURN collect(actedIn) AS actedIn -} -RETURN this { - actedIn: actedIn -} AS this ----- - -== nested - -.GraphQL-Query -[source,graphql,request=true] ----- -{ - actors { - actedIn( - where: {OR: [{AND: [{title: "The Matrix"}, {typename_IN: [Series]}]}, {typename_IN: [Movie]}]} - ) { - title - } - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ - "param0" : "The Matrix", - "param1" : "The Matrix", - "param2" : "The Matrix" -} ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:Actor) -CALL { - WITH this - CALL { - WITH * - MATCH (this)-[actedIn0:ACTED_IN]->(cartoon0:Cartoon) - WHERE ((cartoon0.title = $param0 - AND cartoon0:Series) - OR cartoon0:Movie) - WITH cartoon0 { - __typename: 'Cartoon', - __id: elementId(cartoon0), - .title - } AS cartoon0 - RETURN cartoon0 AS actedIn UNION - WITH * - MATCH (this)-[actedIn1:ACTED_IN]->(movie0:Movie) - WHERE ((movie0.title = $param1 - AND movie0:Series) - OR movie0:Movie) - WITH movie0 { - __typename: 'Movie', - __id: elementId(movie0), - .title - } AS movie0 - RETURN movie0 AS actedIn UNION - WITH * - MATCH (this)-[actedIn2:ACTED_IN]->(series0:Series) - WHERE ((series0.title = $param2 - AND series0:Series) - OR series0:Movie) - WITH series0 { - __typename: 'Series', - __id: elementId(series0), - .title - } AS series0 - RETURN series0 AS actedIn - } - WITH actedIn - RETURN collect(actedIn) AS actedIn -} -RETURN this { - actedIn: actedIn -} AS this ----- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/experimental/typename-in.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/experimental/typename-in.js.adoc deleted file mode 100644 index a9001c98..00000000 --- a/core/src/test/resources/tck-test-files/cypher/v2/experimental/typename-in.js.adoc +++ /dev/null @@ -1,204 +0,0 @@ -// This file was generated by the Test-Case extractor of neo4j-graphql -:toc: -:toclevels: 42 - -= typename_IN - -== Setup - -.Schema -[source,graphql,schema=true] ----- -interface Production { - title: String! - cost: Float! -} - -type Movie implements Production { - title: String! - cost: Float! - runtime: Int! -} - -type Series implements Production { - title: String! - cost: Float! - episodes: Int! -} - -type Cartoon implements Production { - title: String! - cost: Float! - cartoonist: String! -} - -type ActedIn @relationshipProperties { - screenTime: Int! -} - -type Actor { - name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") -} ----- - -== top-level - -.GraphQL-Query -[source,graphql,request=true] ----- -{ - productions( - where: {OR: [{AND: [{title: "The Matrix"}, {typename_IN: [Series]}]}, {typename_IN: [Movie]}]} - ) { - title - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ - "param0": "The Matrix", - "param1": "The Matrix", - "param2": "The Matrix" -} ----- - -.Expected Cypher output -[source,cypher] ----- -CALL { - MATCH (this0:Cartoon) - WHERE ((this0.title = $param0 AND this0:Series) OR this0:Movie) - WITH this0 { .title, __typename: "Cartoon", __id: toString(id(this0)) } AS this0 - RETURN this0 AS this - UNION - MATCH (this1:Movie) - WHERE ((this1.title = $param1 AND this1:Series) OR this1:Movie) - WITH this1 { .title, __typename: "Movie", __id: toString(id(this1)) } AS this1 - RETURN this1 AS this - UNION - MATCH (this2:Series) - WHERE ((this2.title = $param2 AND this2:Series) OR this2:Movie) - WITH this2 { .title, __typename: "Series", __id: toString(id(this2)) } AS this2 - RETURN this2 AS this -} -WITH this -RETURN this AS this ----- - -== top-level + connection where - -.GraphQL-Query -[source,graphql,request=true] ----- -{ - actors( - where: {actedInConnection_SOME: {OR: [{edge: {screenTime: 2}}, {node: {OR: [{title: "The Matrix"}, {typename_IN: [Series]}]}}]}} - ) { - actedIn { - title - } - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ - "param0": 2, - "param1": "The Matrix" -} ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:Actor) -WHERE EXISTS { - MATCH (this)-[this0:ACTED_IN]->(this1) - WHERE ((this0.screenTime = $param0 OR (this1.title = $param1 OR this1:Series)) AND (this1:Cartoon OR this1:Movie OR this1:Series)) -} -CALL { - WITH this - CALL { - WITH * - MATCH (this)-[this2:ACTED_IN]->(this3:Cartoon) - WITH this3 { .title, __typename: "Cartoon", __id: toString(id(this3)) } AS this3 - RETURN this3 AS var4 - UNION - WITH * - MATCH (this)-[this5:ACTED_IN]->(this6:Movie) - WITH this6 { .title, __typename: "Movie", __id: toString(id(this6)) } AS this6 - RETURN this6 AS var4 - UNION - WITH * - MATCH (this)-[this7:ACTED_IN]->(this8:Series) - WITH this8 { .title, __typename: "Series", __id: toString(id(this8)) } AS this8 - RETURN this8 AS var4 - } - WITH var4 - RETURN collect(var4) AS var4 -} -RETURN this { actedIn: var4 } AS this ----- - -== nested - -.GraphQL-Query -[source,graphql,request=true] ----- -{ - actors { - actedIn( - where: {OR: [{AND: [{title: "The Matrix"}, {typename_IN: [Series]}]}, {typename_IN: [Movie]}]} - ) { - title - } - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ - "param0": "The Matrix", - "param1": "The Matrix", - "param2": "The Matrix" -} ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:Actor) -CALL { - WITH this - CALL { - WITH * - MATCH (this)-[this0:ACTED_IN]->(this1:Cartoon) - WHERE ((this1.title = $param0 AND this1:Series) OR this1:Movie) - WITH this1 { .title, __typename: "Cartoon", __id: toString(id(this1)) } AS this1 - RETURN this1 AS var2 - UNION - WITH * - MATCH (this)-[this3:ACTED_IN]->(this4:Movie) - WHERE ((this4.title = $param1 AND this4:Series) OR this4:Movie) - WITH this4 { .title, __typename: "Movie", __id: toString(id(this4)) } AS this4 - RETURN this4 AS var2 - UNION - WITH * - MATCH (this)-[this5:ACTED_IN]->(this6:Series) - WHERE ((this6.title = $param2 AND this6:Series) OR this6:Movie) - WITH this6 { .title, __typename: "Series", __id: toString(id(this6)) } AS this6 - RETURN this6 AS var2 - } - WITH var2 - RETURN collect(var2) AS var2 -} -RETURN this { actedIn: var2 } AS this ----- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/experimental/union-relationship-filtering.adoc b/core/src/test/resources/tck-test-files/cypher/v2/experimental/union-relationship-filtering.adoc deleted file mode 100644 index 99f4f3c2..00000000 --- a/core/src/test/resources/tck-test-files/cypher/v2/experimental/union-relationship-filtering.adoc +++ /dev/null @@ -1,127 +0,0 @@ -:toc: -:toclevels: 42 - -= Union relationship filtering operations - -== Setup - -.Schema -[source,graphql,schema=true] ----- -union Production = Movie | Series - -type Movie { - title: String! - cost: Float - runtime: Int - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") -} - -type Series { - title: String! - episodes: Int - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") -} - -type Actor { - name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") -} - -type ActedIn @relationshipProperties { - screenTime: Int -} ----- - -== Union filter (top level) - -.GraphQL-Query -[source,graphql,request=true] ----- -query actedInWhere { - productions( - where: {Movie: {title: "The Office"}, Series: {title: "The Office 2"}} - ) { - ... on Movie { - title - } - ... on Series { - title - } - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ - "param0" : "The Office", - "param1" : "The Office 2" -} ----- - -.Expected Cypher output -[source,cypher] ----- -CALL { - MATCH (movie0:Movie) - WHERE movie0.title = $param0 - WITH movie0 { - __typename: 'Movie', - __id: elementId(movie0), - .title - } AS movie0 - RETURN movie0 AS this UNION - MATCH (series0:Series) - WHERE series0.title = $param1 - WITH series0 { - __typename: 'Series', - __id: elementId(series0), - .title - } AS series0 - RETURN series0 AS this -} -WITH this -RETURN this AS this ----- - -== Filtering on nested-level relationship unions - -.GraphQL-Query -[source,graphql,request=true] ----- -query actedInWhere { - actors( - where: {actedIn_SOME: {Movie: {title_CONTAINS: "The Office"}, Series: {title_ENDS_WITH: "Office"}}} - ) { - name - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ - "param0" : "The Office", - "param1" : "Office" -} ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:Actor) -WHERE (EXISTS { - MATCH (this)-[:ACTED_IN]->(this0:Movie) - WHERE this0.title CONTAINS $param0 - } - OR EXISTS { - MATCH (this)-[:ACTED_IN]->(this1:Series) - WHERE this1.title ENDS WITH $param1 - }) -RETURN this { - .name -} AS this ----- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/experimental/union-relationship-filtering.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/experimental/union-relationship-filtering.js.adoc deleted file mode 100644 index 46a55ac2..00000000 --- a/core/src/test/resources/tck-test-files/cypher/v2/experimental/union-relationship-filtering.js.adoc +++ /dev/null @@ -1,118 +0,0 @@ -// This file was generated by the Test-Case extractor of neo4j-graphql -:toc: -:toclevels: 42 - -= Union relationship filtering operations - -== Setup - -.Schema -[source,graphql,schema=true] ----- -union Production = Movie | Series - -type Movie { - title: String! - cost: Float - runtime: Int - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") -} - -type Series { - title: String! - episodes: Int - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") -} - -type Actor { - name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") -} - -type ActedIn @relationshipProperties { - screenTime: Int -} ----- - -== Union filter (top level) - -.GraphQL-Query -[source,graphql,request=true] ----- -query actedInWhere { - productions( - where: {Movie: {title: "The Office"}, Series: {title: "The Office 2"}} - ) { - ... on Movie { - title - } - ... on Series { - title - } - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ - "param0": "The Office", - "param1": "The Office 2" -} ----- - -.Expected Cypher output -[source,cypher] ----- -CALL { - MATCH (this0:Movie) - WHERE this0.title = $param0 - WITH this0 { .title, __typename: "Movie", __id: toString(id(this0)) } AS this0 - RETURN this0 AS this - UNION - MATCH (this1:Series) - WHERE this1.title = $param1 - WITH this1 { .title, __typename: "Series", __id: toString(id(this1)) } AS this1 - RETURN this1 AS this -} -WITH this -RETURN this AS this ----- - -== Filtering on nested-level relationship unions - -.GraphQL-Query -[source,graphql,request=true] ----- -query actedInWhere { - actors( - where: {actedIn_SOME: {Movie: {title_CONTAINS: "The Office"}, Series: {title_ENDS_WITH: "Office"}}} - ) { - name - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ - "param0": "The Office", - "param1": "Office" -} ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:Actor) -WHERE (EXISTS { - MATCH (this)-[:ACTED_IN]->(this0:Movie) - WHERE this0.title CONTAINS $param0 -} AND EXISTS { - MATCH (this)-[:ACTED_IN]->(this1:Series) - WHERE this1.title ENDS WITH $param1 -}) -RETURN this { .name } AS this ----- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/experimental/union-top-level.adoc b/core/src/test/resources/tck-test-files/cypher/v2/experimental/union-top-level.adoc deleted file mode 100644 index baa93e9d..00000000 --- a/core/src/test/resources/tck-test-files/cypher/v2/experimental/union-top-level.adoc +++ /dev/null @@ -1,141 +0,0 @@ -:toc: -:toclevels: 42 - -= Union top level operations - -== Setup - -.Schema -[source,graphql,schema=true] ----- -union Search = Genre | Movie - -type Genre { - name: String -} - -type Movie { - title: String - search: [Search!]! @relationship(type: "SEARCH", direction: OUT) -} ----- - -== Read union - -.GraphQL-Query -[source,graphql,request=true] ----- -{ - searches { - ... on Movie { - title - } - ... on Genre { - name - } - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ } ----- - -.Expected Cypher output -[source,cypher] ----- -CALL { - MATCH (genre0:Genre) - WITH genre0 { - __typename: 'Genre', - __id: elementId(genre0), - .name - } AS genre0 - RETURN genre0 AS this UNION - MATCH (movie0:Movie) - WITH movie0 { - __typename: 'Movie', - __id: elementId(movie0), - .title - } AS movie0 - RETURN movie0 AS this -} -WITH this -RETURN this AS this ----- - -== Read union with relationship on member type - -.GraphQL-Query -[source,graphql,request=true] ----- -{ - searches { - ... on Movie { - title - search { - ... on Genre { - name - } - } - } - ... on Genre { - name - } - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ } ----- - -.Expected Cypher output -[source,cypher] ----- -CALL { - MATCH (genre0:Genre) - WITH genre0 { - __typename: 'Genre', - __id: elementId(genre0), - .name - } AS genre0 - RETURN genre0 AS this UNION - MATCH (movie0:Movie) - CALL { - WITH movie0 - CALL { - WITH * - MATCH (movie0)-[search1:SEARCH]->(genre1:Genre) - WITH genre1 { - __typename: 'Genre', - __id: elementId(genre1), - .name - } AS genre1 - RETURN genre1 AS search0 UNION - WITH * - MATCH (movie0)-[search2:SEARCH]->(movie1:Movie) - WITH movie1 { - __typename: 'Movie', - __id: elementId(movie1) - } AS movie1 - RETURN movie1 AS search0 - } - WITH search0 - RETURN collect(search0) AS search0 - } - WITH movie0 { - __typename: 'Movie', - __id: elementId(movie0), - .title, - search: search0 - } AS movie0 - RETURN movie0 AS this -} -WITH this -RETURN this AS this ----- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/experimental/union-top-level.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/experimental/union-top-level.js.adoc deleted file mode 100644 index 67b8e9b4..00000000 --- a/core/src/test/resources/tck-test-files/cypher/v2/experimental/union-top-level.js.adoc +++ /dev/null @@ -1,121 +0,0 @@ -// This file was generated by the Test-Case extractor of neo4j-graphql -:toc: -:toclevels: 42 - -= Union top level operations - -== Setup - -.Schema -[source,graphql,schema=true] ----- -union Search = Genre | Movie - -type Genre { - name: String -} - -type Movie { - title: String - search: [Search!]! @relationship(type: "SEARCH", direction: OUT) -} ----- - -== Read union - -.GraphQL-Query -[source,graphql,request=true] ----- -{ - searches { - ... on Movie { - title - } - ... on Genre { - name - } - } -} ----- - -.Expected Cypher params -[source,json] ----- -{} ----- - -.Expected Cypher output -[source,cypher] ----- -CALL { - MATCH (this0:Genre) - WITH this0 { .name, __typename: "Genre", __id: toString(id(this0)) } AS this0 - RETURN this0 AS this - UNION - MATCH (this1:Movie) - WITH this1 { .title, __typename: "Movie", __id: toString(id(this1)) } AS this1 - RETURN this1 AS this -} -WITH this -RETURN this AS this ----- - -== Read union with relationship on member type - -.GraphQL-Query -[source,graphql,request=true] ----- -{ - searches { - ... on Movie { - title - search { - ... on Genre { - name - } - } - } - ... on Genre { - name - } - } -} ----- - -.Expected Cypher params -[source,json] ----- -{} ----- - -.Expected Cypher output -[source,cypher] ----- -CALL { - MATCH (this0:Genre) - WITH this0 { .name, __typename: "Genre", __id: toString(id(this0)) } AS this0 - RETURN this0 AS this - UNION - MATCH (this1:Movie) - CALL { - WITH this1 - CALL { - WITH * - MATCH (this1)-[this2:SEARCH]->(this3:Genre) - WITH this3 { .name, __typename: "Genre", __id: toString(id(this3)) } AS this3 - RETURN this3 AS var4 - UNION - WITH * - MATCH (this1)-[this5:SEARCH]->(this6:Movie) - WITH this6 { __typename: "Movie", __id: toString(id(this6)) } AS this6 - RETURN this6 AS var4 - } - WITH var4 - RETURN collect(var4) AS var4 - } - WITH this1 { .title, search: var4, __typename: "Movie", __id: toString(id(this1)) } AS this1 - RETURN this1 AS this -} -WITH this -RETURN this AS this ----- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/1348.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/1348.adoc index 330fb5f2..b8485ace 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/1348.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/1348.adoc @@ -13,22 +13,22 @@ interface Product { releatsTo: [Product!]! } -type Series implements Product { +type Series implements Product @node { productTitle: String! - releatsTo: [Product!]! @relationship(type: "RELATES_TO", direction: OUT, queryDirection: DEFAULT_UNDIRECTED) + releatsTo: [Product!]! @relationship(type: "RELATES_TO", direction: OUT, queryDirection: UNDIRECTED) seasons: [Season!]! } -type Season implements Product { +type Season implements Product @node { productTitle: String! - releatsTo: [Product!]! @relationship(type: "RELATES_TO", direction: OUT, queryDirection: DEFAULT_UNDIRECTED) + releatsTo: [Product!]! @relationship(type: "RELATES_TO", direction: OUT, queryDirection: UNDIRECTED) seasonNumber: Int episodes: [ProgrammeItem!]! } -type ProgrammeItem implements Product { +type ProgrammeItem implements Product @node { productTitle: String! - releatsTo: [Product!]! @relationship(type: "RELATES_TO", direction: OUT, queryDirection: DEFAULT_UNDIRECTED) + releatsTo: [Product!]! @relationship(type: "RELATES_TO", direction: OUT, queryDirection: UNDIRECTED) episodeNumber: Int } ---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/1348.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/1348.js.adoc index 358c1838..c556465b 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/1348.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/1348.js.adoc @@ -14,20 +14,20 @@ interface Product { releatsTo: [Product!]! } -type Series implements Product { +type Series implements Product @node { productTitle: String! releatsTo: [Product!]! @relationship(type: "RELATES_TO", direction: OUT, queryDirection: DEFAULT_UNDIRECTED) seasons: [Season!]! } -type Season implements Product { +type Season implements Product @node { productTitle: String! releatsTo: [Product!]! @relationship(type: "RELATES_TO", direction: OUT, queryDirection: DEFAULT_UNDIRECTED) seasonNumber: Int episodes: [ProgrammeItem!]! } -type ProgrammeItem implements Product { +type ProgrammeItem implements Product @node { productTitle: String! releatsTo: [Product!]! @relationship(type: "RELATES_TO", direction: OUT, queryDirection: DEFAULT_UNDIRECTED) episodeNumber: Int @@ -65,17 +65,17 @@ CALL { WITH this CALL { WITH * - MATCH (this)-[this0:RELATES_TO]-(this1:ProgrammeItem) + MATCH (this)-[this0:RELATES_TO]->(this1:ProgrammeItem) WITH this1 { .productTitle, __typename: "ProgrammeItem", __id: toString(id(this1)) } AS this1 RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this3:RELATES_TO]-(this4:Season) + MATCH (this)-[this3:RELATES_TO]->(this4:Season) WITH this4 { .productTitle, __typename: "Season", __id: toString(id(this4)) } AS this4 RETURN this4 AS var2 UNION WITH * - MATCH (this)-[this5:RELATES_TO]-(this6:Series) + MATCH (this)-[this5:RELATES_TO]->(this6:Series) WITH this6 { .productTitle, __typename: "Series", __id: toString(id(this6)) } AS this6 RETURN this6 AS var2 } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/1687.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/1687.adoc index 2ea7a7c0..c519be2a 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/1687.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/1687.adoc @@ -13,14 +13,14 @@ interface Production { title: String } -type Movie implements Production { +type Movie implements Production @node { id: ID title: String actorCount: Int genres: [Genre!]! @relationship(type: "HAS_GENRE", direction: OUT) } -type Genre { +type Genre @node { name: String movies: [Production!]! @relationship(type: "HAS_GENRE", direction: IN) } @@ -32,7 +32,7 @@ type Genre { [source,graphql,request=true] ---- query Genres { - genres(where: {moviesConnection_ALL: {node: {title: "Matrix"}}}) { + genres(where: {moviesConnection_ALL: {node: {title_EQ: "Matrix"}}}) { name } } @@ -51,12 +51,12 @@ query Genres { ---- MATCH (this:Genre) WHERE (EXISTS { - MATCH (this0)-[edge:HAS_GENRE]->(this) + MATCH (this0)-[edge0:HAS_GENRE]->(this) WHERE (this0.title = $param0 AND this0:Movie) } AND NOT (EXISTS { - MATCH (this0)-[edge:HAS_GENRE]->(this) + MATCH (this0)-[edge0:HAS_GENRE]->(this) WHERE NOT ((this0.title = $param0 AND this0:Movie)) })) diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/1687.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/1687.js.adoc index f937b347..bfff1a24 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/1687.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/1687.js.adoc @@ -14,14 +14,14 @@ interface Production { title: String } -type Movie implements Production { +type Movie implements Production @node { id: ID title: String actorCount: Int genres: [Genre!]! @relationship(type: "HAS_GENRE", direction: OUT) } -type Genre { +type Genre @node { name: String movies: [Production!]! @relationship(type: "HAS_GENRE", direction: IN) } @@ -33,7 +33,7 @@ type Genre { [source,graphql,request=true] ---- query Genres { - genres(where: {moviesConnection_ALL: {node: {title: "Matrix"}}}) { + genres(where: {moviesConnection_ALL: {node: {title_EQ: "Matrix"}}}) { name } } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/1779.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/1779.adoc index 66f33db4..61f2a5ec 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/1779.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/1779.adoc @@ -8,13 +8,13 @@ .Schema [source,graphql,schema=true] ---- -type Person { +type Person @node { name: String age: Int attends: [School!]! @relationship(type: "attends", direction: OUT) } -type School { +type School @node { name: String students: [Person!]! @relationship(type: "attends", direction: IN) } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/1779.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/1779.js.adoc index 1cdd5d0d..5ec948c5 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/1779.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/1779.js.adoc @@ -9,13 +9,13 @@ .Schema [source,graphql,schema=true] ---- -type Person { +type Person @node { name: String age: Int attends: [School!]! @relationship(type: "attends", direction: OUT) } -type School { +type School @node { name: String students: [Person!]! @relationship(type: "attends", direction: IN) } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/190.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/190.adoc new file mode 100644 index 00000000..4431fba8 --- /dev/null +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/190.adoc @@ -0,0 +1,127 @@ +:toc: +:toclevels: 42 + += #190 + +== Setup + +.Schema +[source,graphql,schema=true] +---- +type User @node { + client_id: String + uid: String + demographics: [UserDemographics!]! @relationship(type: "HAS_DEMOGRAPHIC", direction: OUT) +} + +type UserDemographics @node { + client_id: String + type: String + value: String + users: [User!]! @relationship(type: "HAS_DEMOGRAPHIC", direction: IN) +} +---- + +== Example 1 + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + users(where: {demographics_SOME: {type_EQ: "Gender", value_EQ: "Female"}}) { + uid + demographics { + type + value + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Gender", + "param1" : "Female" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:User) +WHERE EXISTS { + MATCH (this)-[:HAS_DEMOGRAPHIC]->(this0:UserDemographics) + WHERE (this0.type = $param0 + AND this0.value = $param1) +} +CALL { + WITH this + MATCH (this)-[hasDemographic0:HAS_DEMOGRAPHIC]->(userDemographics0:UserDemographics) + WITH userDemographics0 { + .type, + .value + } AS demographics + RETURN collect(demographics) AS demographics +} +RETURN this { + .uid, + demographics: demographics +} AS this +---- + +== Example 2 + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + users( + where: {demographics_SOME: {OR: [{type_EQ: "Gender", value_EQ: "Female"}, {type_EQ: "State"}, {type_EQ: "Age"}]}} + ) { + uid + demographics { + type + value + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Gender", + "param1" : "Female", + "param2" : "State", + "param3" : "Age" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:User) +WHERE EXISTS { + MATCH (this)-[:HAS_DEMOGRAPHIC]->(this0:UserDemographics) + WHERE ((this0.type = $param0 + AND this0.value = $param1) + OR this0.type = $param2 + OR this0.type = $param3) +} +CALL { + WITH this + MATCH (this)-[hasDemographic0:HAS_DEMOGRAPHIC]->(userDemographics0:UserDemographics) + WITH userDemographics0 { + .type, + .value + } AS demographics + RETURN collect(demographics) AS demographics +} +RETURN this { + .uid, + demographics: demographics +} AS this +---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/190.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/190.js.adoc new file mode 100644 index 00000000..4fd78d0b --- /dev/null +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/190.js.adoc @@ -0,0 +1,112 @@ +// This file was generated by the Test-Case extractor of neo4j-graphql +:toc: +:toclevels: 42 + += #190 + +== Setup + +.Schema +[source,graphql,schema=true] +---- +type User @node { + client_id: String + uid: String + demographics: [UserDemographics!]! @relationship(type: "HAS_DEMOGRAPHIC", direction: OUT) +} + +type UserDemographics @node { + client_id: String + type: String + value: String + users: [User!]! @relationship(type: "HAS_DEMOGRAPHIC", direction: IN) +} +---- + +== Example 1 + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + users(where: {demographics_SOME: {type_EQ: "Gender", value_EQ: "Female"}}) { + uid + demographics { + type + value + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Gender", + "param1": "Female" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:User) +WHERE EXISTS { + MATCH (this)-[:HAS_DEMOGRAPHIC]->(this0:UserDemographics) + WHERE (this0.type = $param0 AND this0.value = $param1) +} +CALL { + WITH this + MATCH (this)-[this1:HAS_DEMOGRAPHIC]->(this2:UserDemographics) + WITH this2 { .type, .value } AS this2 + RETURN collect(this2) AS var3 +} +RETURN this { .uid, demographics: var3 } AS this +---- + +== Example 2 + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + users( + where: {demographics_SOME: {OR: [{type_EQ: "Gender", value_EQ: "Female"}, {type_EQ: "State"}, {type_EQ: "Age"}]}} + ) { + uid + demographics { + type + value + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Gender", + "param1": "Female", + "param2": "State", + "param3": "Age" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:User) +WHERE EXISTS { + MATCH (this)-[:HAS_DEMOGRAPHIC]->(this0:UserDemographics) + WHERE ((this0.type = $param0 AND this0.value = $param1) OR this0.type = $param2 OR this0.type = $param3) +} +CALL { + WITH this + MATCH (this)-[this1:HAS_DEMOGRAPHIC]->(this2:UserDemographics) + WITH this2 { .type, .value } AS this2 + RETURN collect(this2) AS var3 +} +RETURN this { .uid, demographics: var3 } AS this +---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/2262.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/2262.adoc index ba4c081c..fba9fded 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/2262.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/2262.adoc @@ -8,13 +8,13 @@ .Schema [source,graphql,schema=true] ---- -type Component { +type Component @node { uuid: String upstreamProcess: Process @relationship(type: "OUTPUT", direction: IN) downstreamProcesses: [Process!]! @relationship(type: "INPUT", direction: OUT) } -type Process { +type Process @node { uuid: String componentOutputs: [Component!]! @relationship(type: "OUTPUT", direction: OUT) componentInputs: [Component!]! @relationship(type: "INPUT", direction: IN) @@ -27,7 +27,7 @@ type Process { [source,graphql,request=true] ---- query ComponentsProcesses { - components(where: {uuid: "c1"}) { + components(where: {uuid_EQ: "c1"}) { uuid upstreamProcessConnection { edges { diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/2262.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/2262.js.adoc index 8802c852..8b50ec92 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/2262.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/2262.js.adoc @@ -9,13 +9,13 @@ .Schema [source,graphql,schema=true] ---- -type Component { +type Component @node { uuid: String upstreamProcess: Process @relationship(type: "OUTPUT", direction: IN) downstreamProcesses: [Process!]! @relationship(type: "INPUT", direction: OUT) } -type Process { +type Process @node { uuid: String componentOutputs: [Component!]! @relationship(type: "OUTPUT", direction: OUT) componentInputs: [Component!]! @relationship(type: "INPUT", direction: IN) @@ -28,7 +28,7 @@ type Process { [source,graphql,request=true] ---- query ComponentsProcesses { - components(where: {uuid: "c1"}) { + components(where: {uuid_EQ: "c1"}) { uuid upstreamProcessConnection { edges { diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/2614.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/2614.adoc index 35f79a03..9984bdfe 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/2614.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/2614.adoc @@ -19,7 +19,7 @@ type Movie implements Production @node(labels: ["Film"]) { runtime: Int! } -type Series implements Production { +type Series implements Production @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") episodes: Int! @@ -29,7 +29,7 @@ type ActedIn @relationshipProperties { role: String! } -type Actor { +type Actor @node { name: String! actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } @@ -42,7 +42,7 @@ type Actor { ---- query GetProductionsMovie { actors { - actedIn(where: {title: "Test Movie"}) { + actedIn(where: {title_EQ: "Test Movie"}) { title } } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/2614.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/2614.js.adoc index 82ab093e..22efcf02 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/2614.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/2614.js.adoc @@ -20,7 +20,7 @@ type Movie implements Production @node(labels: ["Film"]) { runtime: Int! } -type Series implements Production { +type Series implements Production @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") episodes: Int! @@ -30,7 +30,7 @@ type ActedIn @relationshipProperties { role: String! } -type Actor { +type Actor @node { name: String! actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } @@ -43,7 +43,7 @@ type Actor { ---- query GetProductionsMovie { actors { - actedIn(where: {title: "Test Movie"}) { + actedIn(where: {title_EQ: "Test Movie"}) { title } } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/2713.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/2713.adoc index adb00fea..f04fca36 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/2713.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/2713.adoc @@ -8,18 +8,18 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "InGenre") } -type Genre { +type Genre @node { name: String movies: [Movie!]! @relationship(type: "IN_GENRE", direction: IN, properties: "InGenre") series: [Series!]! @relationship(type: "IN_GENRE", direction: IN, properties: "InGenre") } -type Series { +type Series @node { name: String! genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "InGenre") } @@ -35,7 +35,7 @@ type InGenre @relationshipProperties { [source,graphql,request=true] ---- { - movies(where: {genresConnection_ALL: {node: {name: "Thriller"}}}) { + movies(where: {genresConnection_ALL: {node: {name_EQ: "Thriller"}}}) { title } } @@ -54,11 +54,11 @@ type InGenre @relationshipProperties { ---- MATCH (this:Movie) WHERE (EXISTS { - MATCH (this)-[edge:IN_GENRE]->(this0:Genre) + MATCH (this)-[edge0:IN_GENRE]->(this0:Genre) WHERE this0.name = $param0 } AND NOT (EXISTS { - MATCH (this)-[edge:IN_GENRE]->(this0:Genre) + MATCH (this)-[edge0:IN_GENRE]->(this0:Genre) WHERE NOT (this0.name = $param0) })) RETURN this { diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/2713.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/2713.js.adoc index 2ea749d6..9851dbc4 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/2713.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/2713.js.adoc @@ -9,18 +9,18 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "InGenre") } -type Genre { +type Genre @node { name: String movies: [Movie!]! @relationship(type: "IN_GENRE", direction: IN, properties: "InGenre") series: [Series!]! @relationship(type: "IN_GENRE", direction: IN, properties: "InGenre") } -type Series { +type Series @node { name: String! genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "InGenre") } @@ -36,7 +36,7 @@ type InGenre @relationshipProperties { [source,graphql,request=true] ---- { - movies(where: {genresConnection_ALL: {node: {name: "Thriller"}}}) { + movies(where: {genresConnection_ALL: {node: {name_EQ: "Thriller"}}}) { title } } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/2925.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/2925.adoc index ed5c9216..34802197 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/2925.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/2925.adoc @@ -8,13 +8,13 @@ .Schema [source,graphql,schema=true] ---- -type Group { +type Group @node { name: String hasGroupUser: [User!]! @relationship(type: "HAS_GROUP", direction: IN) hasRequiredGroupUser: [User!]! @relationship(type: "HAS_REQUIRED_GROUP", direction: IN) } -type User { +type User @node { name: String hasGroup: Group @relationship(type: "HAS_GROUP", direction: OUT) hasRequiredGroup: Group! @relationship(type: "HAS_REQUIRED_GROUP", direction: OUT) @@ -86,3 +86,75 @@ RETURN this { .name } AS this ---- + +== should query nested required relationship + +.GraphQL-Query +[source,graphql,request=true] +---- +query Query { + groups(where: {hasGroupUser_SOME: {hasRequiredGroup: {name_IN: ["Group A"]}}}) { + name + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : [ "Group A" ] +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Group) +WHERE EXISTS { + MATCH (this0:User)-[:HAS_GROUP]->(this) + WHERE EXISTS { + MATCH (this0)-[:HAS_REQUIRED_GROUP]->(this00:Group) + WHERE this00.name IN $param0 + } +} +RETURN this { + .name +} AS this +---- + +== should query nested relationship + +.GraphQL-Query +[source,graphql,request=true] +---- +query Query { + groups(where: {hasGroupUser_SOME: {hasGroup: {name_IN: ["Group A"]}}}) { + name + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : [ "Group A" ] +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Group) +WHERE EXISTS { + MATCH (this0:User)-[:HAS_GROUP]->(this) + WHERE EXISTS { + MATCH (this0)-[:HAS_GROUP]->(this00:Group) + WHERE this00.name IN $param0 + } +} +RETURN this { + .name +} AS this +---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/2925.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/2925.js.adoc index f13c0938..3800fdcb 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/2925.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/2925.js.adoc @@ -9,13 +9,13 @@ .Schema [source,graphql,schema=true] ---- -type Group { +type Group @node { name: String hasGroupUser: [User!]! @relationship(type: "HAS_GROUP", direction: IN) hasRequiredGroupUser: [User!]! @relationship(type: "HAS_REQUIRED_GROUP", direction: IN) } -type User { +type User @node { name: String hasGroup: Group @relationship(type: "HAS_GROUP", direction: OUT) hasRequiredGroup: Group! @relationship(type: "HAS_REQUIRED_GROUP", direction: OUT) @@ -84,3 +84,76 @@ WITH * WHERE (hasRequiredGroupCount <> 0 AND this0.name IN $param0) RETURN this { .name } AS this ---- + +== should query nested relationship + +.GraphQL-Query +[source,graphql,request=true] +---- +query Query { + groups(where: {hasGroupUser_SOME: {hasGroup: {name_IN: ["Group A"]}}}) { + name + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": [ + "Group A" + ] +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Group) +WHERE EXISTS { + MATCH (this)<-[:HAS_GROUP]-(this0:User) + WHERE single(this1 IN [(this0)-[:HAS_GROUP]->(this1:Group) WHERE this1.name IN $param0 | 1] WHERE true) +} +RETURN this { .name } AS this +---- + +== should query nested required relationship + +.GraphQL-Query +[source,graphql,request=true] +---- +query Query { + groups(where: {hasGroupUser_SOME: {hasRequiredGroup: {name_IN: ["Group A"]}}}) { + name + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": [ + "Group A" + ] +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Group) +CALL { + WITH this + MATCH (this)<-[:HAS_GROUP]-(this0:User) + OPTIONAL MATCH (this0)-[:HAS_REQUIRED_GROUP]->(this1:Group) + WITH *, count(this1) AS hasRequiredGroupCount + WITH * + WHERE (hasRequiredGroupCount <> 0 AND this1.name IN $param0) + RETURN count(this0) > 0 AS var2 +} +WITH * +WHERE var2 = true +RETURN this { .name } AS this +---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/3215.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/3215.adoc index defc7148..b8fce993 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/3215.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/3215.adoc @@ -10,12 +10,44 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String! age: Int! } ---- +=== should ignore undefined parameters on NOT fields + +.GraphQL-Query +[source,graphql,request=true] +---- +query MyQuery($name: String) { + actors(where: {age_GT: 25, NOT: {name_EQ: $name}}) { + name + age + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : 25 +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Actor) +WHERE this.age > $param0 +RETURN this { + .name, + .age +} AS this +---- + === should ignore undefined parameters on boolean NOT .GraphQL-Query diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/3215.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/3215.js.adoc index 14273ee8..a2eab075 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/3215.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/3215.js.adoc @@ -11,12 +11,41 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String! age: Int! } ---- +=== should ignore undefined parameters on NOT fields + +.GraphQL-Query +[source,graphql,request=true] +---- +query MyQuery($name: String) { + actors(where: {age_GT: 25, NOT: {name_EQ: $name}}) { + name + age + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": 25 +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Actor) +WHERE this.age > $param0 +RETURN this { .name, .age } AS this +---- + === should ignore undefined parameters on boolean NOT .GraphQL-Query diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/3394.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/3394.adoc index badfcc30..489d63b1 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/3394.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/3394.adoc @@ -8,11 +8,11 @@ .Schema [source,graphql,schema=true] ---- -type Employee { +type Employee @node { products: [Product!]! @relationship(type: "CAN_ACCESS", direction: OUT) } -type Product { +type Product @node { id: String! @alias(property: "fg_item_id") description: String! partNumber: ID! @alias(property: "fg_item") @@ -25,7 +25,7 @@ type Product { [source,graphql,request=true] ---- query listProducts { - products(options: {sort: {partNumber: DESC}}) { + products(sort: {partNumber: DESC}) { id partNumber description @@ -58,7 +58,7 @@ RETURN this { ---- query listProducts { employees { - products(options: {sort: {partNumber: DESC}}) { + products(sort: {partNumber: DESC}) { id partNumber description diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/3394.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/3394.js.adoc index 1fb9d97a..83ed5636 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/3394.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/3394.js.adoc @@ -9,11 +9,11 @@ .Schema [source,graphql,schema=true] ---- -type Employee { +type Employee @node { products: [Product!]! @relationship(type: "CAN_ACCESS", direction: OUT) } -type Product { +type Product @node { id: String! @alias(property: "fg_item_id") description: String! partNumber: ID! @alias(property: "fg_item") @@ -26,7 +26,7 @@ type Product { [source,graphql,request=true] ---- query listProducts { - products(options: {sort: {partNumber: DESC}}) { + products(sort: {partNumber: DESC}) { id partNumber description @@ -56,7 +56,7 @@ RETURN this { .description, id: this.fg_item_id, partNumber: this.fg_item } AS t ---- query listProducts { employees { - products(options: {sort: {partNumber: DESC}}) { + products(sort: {partNumber: DESC}) { id partNumber description diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/360.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/360.adoc index eda373ab..d0dc80f9 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/360.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/360.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Event { +type Event @node { id: ID! name: String start: DateTime @@ -24,7 +24,7 @@ type Event { ---- query ($rangeStart: DateTime, $rangeEnd: DateTime, $activity: String) { events( - where: {AND: [{start_GTE: $rangeStart}, {start_LTE: $rangeEnd}, {activity: $activity}]} + where: {AND: [{start_GTE: $rangeStart}, {start_LTE: $rangeEnd}, {activity_EQ: $activity}]} ) { start activity @@ -69,7 +69,7 @@ RETURN this { ---- query ($rangeStart: DateTime, $rangeEnd: DateTime, $activity: String) { events( - where: {OR: [{start_GTE: $rangeStart}, {start_LTE: $rangeEnd}, {activity: $activity}]} + where: {OR: [{start_GTE: $rangeStart}, {start_LTE: $rangeEnd}, {activity_EQ: $activity}]} ) { start activity diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/360.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/360.js.adoc index 6709d741..7967393a 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/360.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/360.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Event { +type Event @node { id: ID! name: String start: DateTime @@ -25,7 +25,7 @@ type Event { ---- query ($rangeStart: DateTime, $rangeEnd: DateTime, $activity: String) { events( - where: {AND: [{start_GTE: $rangeStart}, {start_LTE: $rangeEnd}, {activity: $activity}]} + where: {AND: [{start_GTE: $rangeStart}, {start_LTE: $rangeEnd}, {activity_EQ: $activity}]} ) { start activity @@ -66,7 +66,7 @@ RETURN this { .activity, start: apoc.date.convertFormat(toString(this.start), "i ---- query ($rangeStart: DateTime, $rangeEnd: DateTime, $activity: String) { events( - where: {OR: [{start_GTE: $rangeStart}, {start_LTE: $rangeEnd}, {activity: $activity}]} + where: {OR: [{start_GTE: $rangeStart}, {start_LTE: $rangeEnd}, {activity_EQ: $activity}]} ) { start activity diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/3765.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/3765.adoc index 92e92f2d..79d039fc 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/3765.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/3765.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type User { +type User @node { name: String! otherName: String } -type Post { +type Post @node { content: String! alternateContent: String! likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "likesProperties") @@ -32,7 +32,7 @@ type likesProperties @relationshipProperties { [source,graphql,request=true] ---- { - posts(where: {content: "stuff", alternateContent: "stuff2"}) { + posts(where: {content_EQ: "stuff", alternateContent_EQ: "stuff2"}) { content } } @@ -65,7 +65,7 @@ RETURN this { ---- { posts( - where: {OR: [{content: "stuff", alternateContent: "stuff2"}, {content: "stuff3"}]} + where: {OR: [{content_EQ: "stuff", alternateContent_EQ: "stuff2"}, {content_EQ: "stuff3"}]} ) { content } @@ -100,7 +100,7 @@ RETURN this { [source,graphql,request=true] ---- { - posts(where: {NOT: {content: "stuff", alternateContent: "stuff2"}}) { + posts(where: {NOT: {content_EQ: "stuff", alternateContent_EQ: "stuff2"}}) { content } } @@ -134,7 +134,7 @@ RETURN this { [source,graphql,request=true] ---- { - posts(where: {likes_SOME: {name: "stuff", otherName: "stuff2"}}) { + posts(where: {likes_SOME: {name_EQ: "stuff", otherName_EQ: "stuff2"}}) { content } } @@ -169,7 +169,9 @@ RETURN this { [source,graphql,request=true] ---- { - posts(where: {likes_SOME: {name: "stuff"}, likes_ALL: {otherName: "stuff2"}}) { + posts( + where: {likes_SOME: {name_EQ: "stuff"}, likes_ALL: {otherName_EQ: "stuff2"}} + ) { content } } @@ -212,7 +214,7 @@ RETURN this { ---- { posts( - where: {OR: [{likes_SOME: {name: "stuff"}}, {likes_ALL: {otherName: "stuff2"}}, {likes_SOME: {otherName: "stuff3"}}]} + where: {OR: [{likes_SOME: {name_EQ: "stuff"}}, {likes_ALL: {otherName_EQ: "stuff2"}}, {likes_SOME: {otherName_EQ: "stuff3"}}]} ) { content } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/3765.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/3765.js.adoc index b439c10d..cdd62730 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/3765.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/3765.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type User { +type User @node { name: String! otherName: String } -type Post { +type Post @node { content: String! alternateContent: String! likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "likesProperties") @@ -33,7 +33,7 @@ type likesProperties @relationshipProperties { [source,graphql,request=true] ---- { - posts(where: {content: "stuff", alternateContent: "stuff2"}) { + posts(where: {content_EQ: "stuff", alternateContent_EQ: "stuff2"}) { content } } @@ -63,7 +63,7 @@ RETURN this { .content } AS this ---- { posts( - where: {OR: [{content: "stuff", alternateContent: "stuff2"}, {content: "stuff3"}]} + where: {OR: [{content_EQ: "stuff", alternateContent_EQ: "stuff2"}, {content_EQ: "stuff3"}]} ) { content } @@ -94,7 +94,7 @@ RETURN this { .content } AS this [source,graphql,request=true] ---- { - posts(where: {NOT: {content: "stuff", alternateContent: "stuff2"}}) { + posts(where: {NOT: {content_EQ: "stuff", alternateContent_EQ: "stuff2"}}) { content } } @@ -125,7 +125,7 @@ RETURN this { .content } AS this [source,graphql,request=true] ---- { - posts(where: {likes_SOME: {name: "stuff", otherName: "stuff2"}}) { + posts(where: {likes_SOME: {name_EQ: "stuff", otherName_EQ: "stuff2"}}) { content } } @@ -157,7 +157,9 @@ RETURN this { .content } AS this [source,graphql,request=true] ---- { - posts(where: {likes_SOME: {name: "stuff"}, likes_ALL: {otherName: "stuff2"}}) { + posts( + where: {likes_SOME: {name_EQ: "stuff"}, likes_ALL: {otherName_EQ: "stuff2"}} + ) { content } } @@ -196,7 +198,7 @@ RETURN this { .content } AS this ---- { posts( - where: {OR: [{likes_SOME: {name: "stuff"}}, {likes_ALL: {otherName: "stuff2"}}, {likes_SOME: {otherName: "stuff3"}}]} + where: {OR: [{likes_SOME: {name_EQ: "stuff"}}, {likes_ALL: {otherName_EQ: "stuff2"}}, {likes_SOME: {otherName_EQ: "stuff3"}}]} ) { content } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/4007.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/4007.adoc index e8024df1..157c569f 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/4007.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/4007.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/4007.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/4007.js.adoc index 3fc38e1e..77aead3c 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/4007.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/4007.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/4015.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/4015.adoc index 51f240f9..5ab104ff 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/4015.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/4015.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! surname: String movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/4015.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/4015.js.adoc index cba20e4b..a16fe20d 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/4015.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/4015.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! surname: String movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/402.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/402.adoc index 5ada160c..f232373d 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/402.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/402.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Event { +type Event @node { id: ID! area: Area! @relationship(type: "HAPPENS_IN", direction: OUT) } -type Area { +type Area @node { id: ID! } ---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/402.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/402.js.adoc index 48a24ad9..413c09a8 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/402.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/402.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Event { +type Event @node { id: ID! area: Area! @relationship(type: "HAPPENS_IN", direction: OUT) } -type Area { +type Area @node { id: ID! } ---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/4287.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/4287.adoc index ed05a6db..f041d3cc 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/4287.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/4287.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String actedIn: [Production!]! @relationship(type: "ACTED_IN", properties: "actedIn", direction: OUT) } @@ -21,12 +21,12 @@ interface Production { title: String } -type Movie implements Production { +type Movie implements Production @node { title: String runtime: Int } -type Series implements Production { +type Series implements Production @node { title: String episodes: Int } @@ -38,7 +38,7 @@ type Series implements Production { { actors { actedInConnection( - where: {OR: [{node: {title: "something"}}, {node: {title: "whatever"}}]} + where: {OR: [{node: {title_EQ: "something"}}, {node: {title_EQ: "whatever"}}]} ) { edges { node { diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/4287.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/4287.js.adoc index db409b33..861125a5 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/4287.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/4287.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String actedIn: [Production!]! @relationship(type: "ACTED_IN", properties: "actedIn", direction: OUT) } @@ -22,12 +22,12 @@ interface Production { title: String } -type Movie implements Production { +type Movie implements Production @node { title: String runtime: Int } -type Series implements Production { +type Series implements Production @node { title: String episodes: Int } @@ -39,7 +39,7 @@ type Series implements Production { { actors { actedInConnection( - where: {OR: [{node: {title: "something"}}, {node: {title: "whatever"}}]} + where: {OR: [{node: {title_EQ: "something"}}, {node: {title_EQ: "whatever"}}]} ) { edges { node { diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/433.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/433.adoc index d5fdaa51..fe6e4330 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/433.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/433.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String actors: [Person!]! @relationship(type: "ACTED_IN", direction: OUT) } -type Person { +type Person @node { name: String } ---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/433.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/433.js.adoc index 5e0a1a63..fe47794b 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/433.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/433.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String actors: [Person!]! @relationship(type: "ACTED_IN", direction: OUT) } -type Person { +type Person @node { name: String } ---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/4432.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/4432.adoc index 043384ec..ee3bd186 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/4432.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/4432.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Inventory { +type Inventory @node { id: ID children: [Scenario!]! @relationship(type: "HasChildren", properties: "InventoryChildRelation", direction: OUT) } @@ -17,11 +17,11 @@ interface Scenario { id: ID } -type Image implements Scenario { +type Image implements Scenario @node { id: ID } -type Video implements Scenario { +type Video implements Scenario @node { id: ID } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/4432.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/4432.js.adoc index 309c04f9..67c12594 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/4432.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/4432.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Inventory { +type Inventory @node { id: ID children: [Scenario!]! @relationship(type: "HasChildren", properties: "InventoryChildRelation", direction: OUT) } @@ -18,11 +18,11 @@ interface Scenario { id: ID } -type Image implements Scenario { +type Image implements Scenario @node { id: ID } -type Video implements Scenario { +type Video implements Scenario @node { id: ID } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/4450.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/4450.adoc index a30eba6c..b972d62a 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/4450.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/4450.adoc @@ -8,18 +8,18 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String scene: [Scene!]! @relationship(type: "IN_SCENE", properties: "ActorScene", direction: OUT) } -type Scene { +type Scene @node { number: Int actors: [Actor!]! @relationship(type: "IN_SCENE", properties: "ActorScene", direction: IN) location: Location! @relationship(type: "AT_LOCATION", direction: OUT) } -type Location { +type Location @node { city: String scenes: [Scene!]! @relationship(type: "AT_LOCATION", direction: IN) } @@ -34,7 +34,7 @@ type ActorScene @relationshipProperties { ---- { actors( - where: {sceneConnection_SOME: {edge: {cut: true}, node: {location: {city: "test"}}}} + where: {sceneConnection_SOME: {edge: {cut_EQ: true}, node: {location: {city_EQ: "test"}}}} ) { name } @@ -55,12 +55,12 @@ type ActorScene @relationshipProperties { ---- MATCH (this:Actor) WHERE EXISTS { - MATCH (this)-[edge:IN_SCENE]->(this0:Scene) + MATCH (this)-[edge0:IN_SCENE]->(this0:Scene) WHERE (EXISTS { MATCH (this0)-[:AT_LOCATION]->(this00:Location) WHERE this00.city = $param0 } - AND edge.cut = $param1) + AND edge0.cut = $param1) } RETURN this { .name diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/4450.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/4450.js.adoc index da6c1ee3..bb888967 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/4450.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/4450.js.adoc @@ -9,18 +9,18 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String scene: [Scene!]! @relationship(type: "IN_SCENE", properties: "ActorScene", direction: OUT) } -type Scene { +type Scene @node { number: Int actors: [Actor!]! @relationship(type: "IN_SCENE", properties: "ActorScene", direction: IN) location: Location! @relationship(type: "AT_LOCATION", direction: OUT) } -type Location { +type Location @node { city: String scenes: [Scene!]! @relationship(type: "AT_LOCATION", direction: IN) } @@ -35,7 +35,7 @@ type ActorScene @relationshipProperties { ---- { actors( - where: {sceneConnection_SOME: {edge: {cut: true}, node: {location: {city: "test"}}}} + where: {sceneConnection_SOME: {edge: {cut_EQ: true}, node: {location: {city_EQ: "test"}}}} ) { name } @@ -59,12 +59,12 @@ CALL { WITH this MATCH (this)-[this0:IN_SCENE]->(this1:Scene) OPTIONAL MATCH (this1)-[:AT_LOCATION]->(this2:Location) - WITH *, count(this2) AS locationCount + WITH *, count(this2) AS var3 WITH * - WHERE ((locationCount <> 0 AND this2.city = $param0) AND this0.cut = $param1) - RETURN count(this1) > 0 AS var3 + WHERE ((var3 <> 0 AND this2.city = $param0) AND this0.cut = $param1) + RETURN count(this1) > 0 AS var4 } WITH * -WHERE var3 = true +WHERE var4 = true RETURN this { .name } AS this ---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/4667.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/4667.adoc index 2b839096..4bff9440 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/4667.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/4667.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type MyThing { +type MyThing @node { id: ID! @id stuff: MyStuff @relationship(type: "THE_STUFF", direction: OUT) } -type MyStuff { +type MyStuff @node { id: ID! @id thing: MyThing @relationship(type: "THE_STUFF", direction: IN) } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/4667.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/4667.js.adoc index 62062318..3169bb2e 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/4667.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/4667.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type MyThing { +type MyThing @node { id: ID! @id stuff: MyStuff @relationship(type: "THE_STUFF", direction: OUT) } -type MyStuff { +type MyStuff @node { id: ID! @id thing: MyThing @relationship(type: "THE_STUFF", direction: IN) } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/582.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/582.adoc new file mode 100644 index 00000000..799a804b --- /dev/null +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/582.adoc @@ -0,0 +1,150 @@ +:toc: +:toclevels: 42 + += #582 + +== Setup + +.Schema +[source,graphql,schema=true] +---- +type Entity @node { + children: [Entity!]! @relationship(type: "EDGE", properties: "Edge", direction: OUT) + parents: [Entity!]! @relationship(type: "EDGE", properties: "Edge", direction: IN) + type: String! +} + +type Edge @relationshipProperties { + type: String! +} +---- + +== should be able to nest connection where inputs + +.GraphQL-Query +[source,graphql,request=true] +---- +query ($where: EntityWhere) { + entities(where: $where) { + type + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "where" : { + "type_EQ" : "Cat", + "childrenConnection_SOME" : { + "node" : { + "type_EQ" : "Dog", + "parentsConnection_SOME" : { + "node" : { + "type_EQ" : "Bird" + } + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Bird", + "param1" : "Dog", + "param2" : "Cat" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Entity) +WHERE (EXISTS { + MATCH (this)-[edge0:EDGE]->(this0:Entity) + WHERE (EXISTS { + MATCH (this00:Entity)-[edge1:EDGE]->(this0) + WHERE this00.type = $param0 + } + AND this0.type = $param1) + } + AND this.type = $param2) +RETURN this { + .type +} AS this +---- + +== should be able to nest connection where inputs down more levels + +.GraphQL-Query +[source,graphql,request=true] +---- +query ($where: EntityWhere) { + entities(where: $where) { + type + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "where" : { + "type_EQ" : "Cat", + "childrenConnection_SOME" : { + "node" : { + "type_EQ" : "Dog", + "parentsConnection_SOME" : { + "node" : { + "type_EQ" : "Bird", + "childrenConnection_SOME" : { + "node" : { + "type_EQ" : "Fish" + } + } + } + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "Fish", + "param1" : "Bird", + "param2" : "Dog", + "param3" : "Cat" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Entity) +WHERE (EXISTS { + MATCH (this)-[edge0:EDGE]->(this0:Entity) + WHERE (EXISTS { + MATCH (this00:Entity)-[edge1:EDGE]->(this0) + WHERE (EXISTS { + MATCH (this00)-[edge2:EDGE]->(this000:Entity) + WHERE this000.type = $param0 + } + AND this00.type = $param1) + } + AND this0.type = $param2) + } + AND this.type = $param3) +RETURN this { + .type +} AS this +---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/582.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/582.js.adoc new file mode 100644 index 00000000..a0a90a95 --- /dev/null +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/582.js.adoc @@ -0,0 +1,142 @@ +// This file was generated by the Test-Case extractor of neo4j-graphql +:toc: +:toclevels: 42 + += #582 + +== Setup + +.Schema +[source,graphql,schema=true] +---- +type Entity @node { + children: [Entity!]! @relationship(type: "EDGE", properties: "Edge", direction: OUT) + parents: [Entity!]! @relationship(type: "EDGE", properties: "Edge", direction: IN) + type: String! +} + +type Edge @relationshipProperties { + type: String! +} +---- + +== should be able to nest connection where inputs + +.GraphQL-Query +[source,graphql,request=true] +---- +query ($where: EntityWhere) { + entities(where: $where) { + type + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "where": { + "type_EQ": "Cat", + "childrenConnection_SOME": { + "node": { + "type_EQ": "Dog", + "parentsConnection_SOME": { + "node": { + "type_EQ": "Bird" + } + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Cat", + "param1": "Dog", + "param2": "Bird" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Entity) +WHERE (this.type = $param0 AND EXISTS { + MATCH (this)-[this0:EDGE]->(this1:Entity) + WHERE (this1.type = $param1 AND EXISTS { + MATCH (this1)<-[this2:EDGE]-(this3:Entity) + WHERE this3.type = $param2 + }) +}) +RETURN this { .type } AS this +---- + +== should be able to nest connection where inputs down more levels + +.GraphQL-Query +[source,graphql,request=true] +---- +query ($where: EntityWhere) { + entities(where: $where) { + type + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "where": { + "type_EQ": "Cat", + "childrenConnection_SOME": { + "node": { + "type_EQ": "Dog", + "parentsConnection_SOME": { + "node": { + "type_EQ": "Bird", + "childrenConnection_SOME": { + "node": { + "type_EQ": "Fish" + } + } + } + } + } + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "Cat", + "param1": "Dog", + "param2": "Bird", + "param3": "Fish" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Entity) +WHERE (this.type = $param0 AND EXISTS { + MATCH (this)-[this0:EDGE]->(this1:Entity) + WHERE (this1.type = $param1 AND EXISTS { + MATCH (this1)<-[this2:EDGE]-(this3:Entity) + WHERE (this3.type = $param2 AND EXISTS { + MATCH (this3)-[this4:EDGE]->(this5:Entity) + WHERE this5.type = $param3 + }) + }) +}) +RETURN this { .type } AS this +---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/583.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/583.adoc index 6a35d05e..0cfd761b 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/583.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/583.adoc @@ -16,23 +16,23 @@ interface Awardable { awardsGiven: Int! } -type Actor implements Awardable { +type Actor implements Awardable @node { name: String awardsGiven: Int! actedIn: [Show!]! @relationship(type: "ACTED_IN", direction: OUT) } -type Movie implements Show & Awardable { +type Movie implements Show & Awardable @node { title: String awardsGiven: Int! } -type Series implements Show & Awardable { +type Series implements Show & Awardable @node { title: String awardsGiven: Int! } -type ShortFilm implements Show { +type ShortFilm implements Show @node { title: String } ---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/583.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/583.js.adoc index 5e8548d3..d7c3ebc8 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/issues/583.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/583.js.adoc @@ -17,23 +17,23 @@ interface Awardable { awardsGiven: Int! } -type Actor implements Awardable { +type Actor implements Awardable @node { name: String awardsGiven: Int! actedIn: [Show!]! @relationship(type: "ACTED_IN", direction: OUT) } -type Movie implements Show & Awardable { +type Movie implements Show & Awardable @node { title: String awardsGiven: Int! } -type Series implements Show & Awardable { +type Series implements Show & Awardable @node { title: String awardsGiven: Int! } -type ShortFilm implements Show { +type ShortFilm implements Show @node { title: String } ---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/5887.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/5887.adoc new file mode 100644 index 00000000..1dea0adf --- /dev/null +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/5887.adoc @@ -0,0 +1,215 @@ +:toc: +:toclevels: 42 + += https://github.com/neo4j/graphql/issues/5887 + +== Setup + +.Schema +[source,graphql,schema=true] +---- +interface Base { + id: ID! +} + +type A implements Base @node { + id: ID! +} + +type B implements Base @node { + id: ID! +} + +type Test @node { + base: Base! @relationship(type: "HAS", direction: OUT) +} +---- + +== should return relationship when first interface match + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + tests(where: {base: {id: "1"}}) { + base { + id + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "1", + "param1" : "1" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Test) +WHERE (EXISTS { + MATCH (this)-[:HAS]->(this0:A) + WHERE this0.id = $param0 + } + OR EXISTS { + MATCH (this)-[:HAS]->(this1:B) + WHERE this1.id = $param1 + }) +CALL { + WITH this + CALL { + WITH * + MATCH (this)-[has0:HAS]->(a0:A) + WITH a0 { + __typename: 'A', + __id: elementId(a0), + .id + } AS a0 + RETURN a0 AS base UNION + WITH * + MATCH (this)-[has1:HAS]->(b0:B) + WITH b0 { + __typename: 'B', + __id: elementId(b0), + .id + } AS b0 + RETURN b0 AS base + } + WITH base + RETURN head(collect(base)) AS base +} +RETURN this { + base: base +} AS this +---- + +== should return relationship when second interface match + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + tests(where: {base: {id: "2"}}) { + base { + id + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "2", + "param1" : "2" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Test) +WHERE (EXISTS { + MATCH (this)-[:HAS]->(this0:A) + WHERE this0.id = $param0 + } + OR EXISTS { + MATCH (this)-[:HAS]->(this1:B) + WHERE this1.id = $param1 + }) +CALL { + WITH this + CALL { + WITH * + MATCH (this)-[has0:HAS]->(a0:A) + WITH a0 { + __typename: 'A', + __id: elementId(a0), + .id + } AS a0 + RETURN a0 AS base UNION + WITH * + MATCH (this)-[has1:HAS]->(b0:B) + WITH b0 { + __typename: 'B', + __id: elementId(b0), + .id + } AS b0 + RETURN b0 AS base + } + WITH base + RETURN head(collect(base)) AS base +} +RETURN this { + base: base +} AS this +---- + +== should not return relationship when no interface match + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + tests(where: {base: {id: "x"}}) { + base { + id + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "x", + "param1" : "x" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Test) +WHERE (EXISTS { + MATCH (this)-[:HAS]->(this0:A) + WHERE this0.id = $param0 + } + OR EXISTS { + MATCH (this)-[:HAS]->(this1:B) + WHERE this1.id = $param1 + }) +CALL { + WITH this + CALL { + WITH * + MATCH (this)-[has0:HAS]->(a0:A) + WITH a0 { + __typename: 'A', + __id: elementId(a0), + .id + } AS a0 + RETURN a0 AS base UNION + WITH * + MATCH (this)-[has1:HAS]->(b0:B) + WITH b0 { + __typename: 'B', + __id: elementId(b0), + .id + } AS b0 + RETURN b0 AS base + } + WITH base + RETURN head(collect(base)) AS base +} +RETURN this { + base: base +} AS this +---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/5887.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/5887.js.adoc new file mode 100644 index 00000000..c1cffd9d --- /dev/null +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/5887.js.adoc @@ -0,0 +1,183 @@ +// This file was generated by the Test-Case extractor of neo4j-graphql +:toc: +:toclevels: 42 + += https://github.com/neo4j/graphql/issues/5887 + +== Setup + +.Schema +[source,graphql,schema=true] +---- +interface Base { + id: ID! +} + +type A implements Base { + id: ID! +} + +type B implements Base { + id: ID! +} + +type Test { + base: Base! @relationship(type: "HAS", direction: OUT) +} +---- + +== should return relationship when first interface match + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + tests(where: {base: {id: "1"}}) { + base { + id + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "1", + "param1": "1" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Test) +OPTIONAL MATCH (this)-[:HAS]->(this0:A) +WITH *, count(this0) AS var1 +OPTIONAL MATCH (this)-[:HAS]->(this2:B) +WITH *, count(this2) AS var3 +WITH * +WHERE ((var1 <> 0 AND this0.id = $param0) OR (var3 <> 0 AND this2.id = $param1)) +CALL { + WITH this + CALL { + WITH * + MATCH (this)-[this4:HAS]->(this5:A) + WITH this5 { .id, __typename: "A", __id: toString(id(this5)) } AS this5 + RETURN this5 AS var6 + UNION + WITH * + MATCH (this)-[this7:HAS]->(this8:B) + WITH this8 { .id, __typename: "B", __id: toString(id(this8)) } AS this8 + RETURN this8 AS var6 + } + WITH var6 + RETURN head(collect(var6)) AS var6 +} +RETURN this { base: var6 } AS this +---- + +== should return relationship when second interface match + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + tests(where: {base: {id: "2"}}) { + base { + id + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "2", + "param1": "2" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Test) +OPTIONAL MATCH (this)-[:HAS]->(this0:A) +WITH *, count(this0) AS var1 +OPTIONAL MATCH (this)-[:HAS]->(this2:B) +WITH *, count(this2) AS var3 +WITH * +WHERE ((var1 <> 0 AND this0.id = $param0) OR (var3 <> 0 AND this2.id = $param1)) +CALL { + WITH this + CALL { + WITH * + MATCH (this)-[this4:HAS]->(this5:A) + WITH this5 { .id, __typename: "A", __id: toString(id(this5)) } AS this5 + RETURN this5 AS var6 + UNION + WITH * + MATCH (this)-[this7:HAS]->(this8:B) + WITH this8 { .id, __typename: "B", __id: toString(id(this8)) } AS this8 + RETURN this8 AS var6 + } + WITH var6 + RETURN head(collect(var6)) AS var6 +} +RETURN this { base: var6 } AS this +---- + +== should not return relationship when no interface match + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + tests(where: {base: {id: "x"}}) { + base { + id + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": "x", + "param1": "x" +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Test) +OPTIONAL MATCH (this)-[:HAS]->(this0:A) +WITH *, count(this0) AS var1 +OPTIONAL MATCH (this)-[:HAS]->(this2:B) +WITH *, count(this2) AS var3 +WITH * +WHERE ((var1 <> 0 AND this0.id = $param0) OR (var3 <> 0 AND this2.id = $param1)) +CALL { + WITH this + CALL { + WITH * + MATCH (this)-[this4:HAS]->(this5:A) + WITH this5 { .id, __typename: "A", __id: toString(id(this5)) } AS this5 + RETURN this5 AS var6 + UNION + WITH * + MATCH (this)-[this7:HAS]->(this8:B) + WITH this8 { .id, __typename: "B", __id: toString(id(this8)) } AS this8 + RETURN this8 AS var6 + } + WITH var6 + RETURN head(collect(var6)) AS var6 +} +RETURN this { base: var6 } AS this +---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/988.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/988.adoc new file mode 100644 index 00000000..e5b68e68 --- /dev/null +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/988.adoc @@ -0,0 +1,204 @@ +:toc: +:toclevels: 42 + += https://github.com/neo4j/graphql/issues/988 + +== Setup + +.Schema +[source,graphql,schema=true] +---- +type Series @node { + name: String + current: Boolean! + manufacturer: [Manufacturer!]! @relationship(type: "MANUFACTURER", properties: "RelationProps", direction: OUT) + brand: [Brand!]! @relationship(type: "BRAND", properties: "RelationProps", direction: OUT) +} + +type Brand @node { + name: String + current: Boolean! +} + +type Manufacturer @node { + name: String + current: Boolean! +} + +type RelationProps @relationshipProperties { + current: Boolean! +} +---- + +== where with multiple filters and params + +.GraphQL-Query +[source,graphql,request=true] +---- +query getSeriesWithRelationFilters($where: SeriesWhere = {current: true}) { + series(where: $where) { + name + current + manufacturerConnection { + edges { + properties { + current + } + node { + name + } + } + } + brandConnection { + edges { + properties { + current + } + node { + name + } + } + } + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "where" : { + "current_EQ" : true, + "AND" : [ { + "OR" : [ { + "manufacturerConnection_SOME" : { + "edge" : { + "current_EQ" : true + }, + "node" : { + "name_EQ" : "C" + } + } + }, { + "manufacturerConnection_SOME" : { + "edge" : { + "current_EQ" : false + }, + "node" : { + "name_EQ" : "AM" + } + } + } ] + }, { + "OR" : [ { + "brandConnection_SOME" : { + "edge" : { + "current_EQ" : true + }, + "node" : { + "name_EQ" : "smart" + } + } + } ] + } ] + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : "C", + "param1" : true, + "param2" : "AM", + "param3" : false, + "param4" : "smart", + "param5" : true, + "param6" : true +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Series) +WHERE ((EXISTS { + MATCH (this)-[edge0:MANUFACTURER]->(this0:Manufacturer) + WHERE (this0.name = $param0 + AND edge0.current = $param1) + } + OR EXISTS { + MATCH (this)-[edge1:MANUFACTURER]->(this1:Manufacturer) + WHERE (this1.name = $param2 + AND edge1.current = $param3) + }) + AND EXISTS { + MATCH (this)-[edge2:BRAND]->(this2:Brand) + WHERE (this2.name = $param4 + AND edge2.current = $param5) + } + AND this.current = $param6) +CALL { + WITH this + MATCH (this)-[manufacturer1:MANUFACTURER]->(manufacturer0:Manufacturer) + WITH collect( { + node: manufacturer0, + relationship: manufacturer1 + }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS manufacturer0, edge.relationship AS manufacturer1 + RETURN collect( { + properties: { + __typename: 'RelationProps', + current: manufacturer1.current + }, + node: { + __typename: 'Manufacturer', + name: manufacturer0.name + } + }) AS manufacturerConnectionEdges + } + RETURN { + edges: manufacturerConnectionEdges, + totalCount: totalCount + } AS manufacturerConnection +} +CALL { + WITH this + MATCH (this)-[brand1:BRAND]->(brand0:Brand) + WITH collect( { + node: brand0, + relationship: brand1 + }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS brand0, edge.relationship AS brand1 + RETURN collect( { + properties: { + __typename: 'RelationProps', + current: brand1.current + }, + node: { + __typename: 'Brand', + name: brand0.name + } + }) AS brandConnectionEdges + } + RETURN { + edges: brandConnectionEdges, + totalCount: totalCount + } AS brandConnection +} +RETURN this { + .name, + .current, + manufacturerConnection: manufacturerConnection, + brandConnection: brandConnection +} AS this +---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/issues/988.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/issues/988.js.adoc new file mode 100644 index 00000000..18533d4c --- /dev/null +++ b/core/src/test/resources/tck-test-files/cypher/v2/issues/988.js.adoc @@ -0,0 +1,172 @@ +// This file was generated by the Test-Case extractor of neo4j-graphql +:toc: +:toclevels: 42 + += https://github.com/neo4j/graphql/issues/988 + +== Setup + +.Schema +[source,graphql,schema=true] +---- +type Series @node { + name: String + current: Boolean! + manufacturer: [Manufacturer!]! @relationship(type: "MANUFACTURER", properties: "RelationProps", direction: OUT) + brand: [Brand!]! @relationship(type: "BRAND", properties: "RelationProps", direction: OUT) +} + +type Brand @node { + name: String + current: Boolean! +} + +type Manufacturer @node { + name: String + current: Boolean! +} + +type RelationProps @relationshipProperties { + current: Boolean! +} +---- + +== where with multiple filters and params + +.GraphQL-Query +[source,graphql,request=true] +---- +query getSeriesWithRelationFilters($where: SeriesWhere = {current: true}) { + series(where: $where) { + name + current + manufacturerConnection { + edges { + properties { + current + } + node { + name + } + } + } + brandConnection { + edges { + properties { + current + } + node { + name + } + } + } + } +} +---- + +.GraphQL params input +[source,json,request=true] +---- +{ + "where": { + "current_EQ": true, + "AND": [ + { + "OR": [ + { + "manufacturerConnection_SOME": { + "edge": { + "current_EQ": true + }, + "node": { + "name_EQ": "C" + } + } + }, + { + "manufacturerConnection_SOME": { + "edge": { + "current_EQ": false + }, + "node": { + "name_EQ": "AM" + } + } + } + ] + }, + { + "OR": [ + { + "brandConnection_SOME": { + "edge": { + "current_EQ": true + }, + "node": { + "name_EQ": "smart" + } + } + } + ] + } + ] + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": true, + "param1": "C", + "param2": true, + "param3": "AM", + "param4": false, + "param5": "smart", + "param6": true +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Series) +WHERE (this.current = $param0 AND ((EXISTS { + MATCH (this)-[this0:MANUFACTURER]->(this1:Manufacturer) + WHERE (this1.name = $param1 AND this0.current = $param2) +} OR EXISTS { + MATCH (this)-[this2:MANUFACTURER]->(this3:Manufacturer) + WHERE (this3.name = $param3 AND this2.current = $param4) +}) AND EXISTS { + MATCH (this)-[this4:BRAND]->(this5:Brand) + WHERE (this5.name = $param5 AND this4.current = $param6) +})) +CALL { + WITH this + MATCH (this)-[this6:MANUFACTURER]->(this7:Manufacturer) + WITH collect({ node: this7, relationship: this6 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this7, edge.relationship AS this6 + RETURN collect({ properties: { current: this6.current, __typename: "RelationProps" }, node: { name: this7.name, __typename: "Manufacturer" } }) AS var8 + } + RETURN { edges: var8, totalCount: totalCount } AS var9 +} +CALL { + WITH this + MATCH (this)-[this10:BRAND]->(this11:Brand) + WITH collect({ node: this11, relationship: this10 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this11, edge.relationship AS this10 + RETURN collect({ properties: { current: this10.current, __typename: "RelationProps" }, node: { name: this11.name, __typename: "Brand" } }) AS var12 + } + RETURN { edges: var12, totalCount: totalCount } AS var13 +} +RETURN this { .name, .current, manufacturerConnection: var9, brandConnection: var13 } AS this +---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/null.adoc b/core/src/test/resources/tck-test-files/cypher/v2/null.adoc index a0859563..971f0ccf 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/null.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/null.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } -type Movie { +type Movie @node { id: ID title: String actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) @@ -27,7 +27,7 @@ type Movie { [source,graphql,request=true] ---- { - movies(where: {title: null}) { + movies(where: {title_EQ: null}) { title } } @@ -48,3 +48,91 @@ RETURN this { .title } AS this ---- + +== Simple relationship IS NOT NULL + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {NOT: {actors_SOME: null}}) { + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ } +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE NOT (NOT (EXISTS { + MATCH (this0:Actor)-[:ACTED_IN]->(this) +})) +RETURN this { + .title +} AS this +---- + +== Simple relationship IS NULL + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {actors_SOME: null}) { + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ } +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE NOT (EXISTS { + MATCH (this0:Actor)-[:ACTED_IN]->(this) +}) +RETURN this { + .title +} AS this +---- + +== Simple IS NOT NULL + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {NOT: {title_EQ: null}}) { + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ } +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.title IS NOT NULL +RETURN this { + .title +} AS this +---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/null.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/null.js.adoc index 661e4ac3..ad80c7c8 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/null.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/null.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } -type Movie { +type Movie @node { id: ID title: String actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) @@ -28,7 +28,7 @@ type Movie { [source,graphql,request=true] ---- { - movies(where: {title: null}) { + movies(where: {title_EQ: null}) { title } } @@ -47,3 +47,85 @@ MATCH (this:Movie) WHERE this.title IS NULL RETURN this { .title } AS this ---- + +== Simple IS NOT NULL + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {NOT: {title_EQ: null}}) { + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE NOT (this.title IS NULL) +RETURN this { .title } AS this +---- + +== Simple relationship IS NULL + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {actors_SOME: null}) { + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE NOT (EXISTS { + MATCH (this)<-[:ACTED_IN]-(this0:Actor) +}) +RETURN this { .title } AS this +---- + +== Simple relationship IS NOT NULL + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {NOT: {actors_SOME: null}}) { + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE NOT (NOT (EXISTS { + MATCH (this)<-[:ACTED_IN]-(this0:Actor) +})) +RETURN this { .title } AS this +---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/pagination.adoc b/core/src/test/resources/tck-test-files/cypher/v2/pagination.adoc index f56cd21f..b56431e2 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/pagination.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/pagination.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID title: String } @@ -20,7 +20,7 @@ type Movie { [source,graphql,request=true] ---- { - movies(options: {offset: 1}) { + movies(offset: 1) { title } } @@ -50,7 +50,7 @@ RETURN this { [source,graphql,request=true] ---- { - movies(options: {limit: 1}) { + movies(limit: 1) { title } } @@ -80,7 +80,7 @@ RETURN this { [source,graphql,request=true] ---- { - movies(options: {limit: 1, offset: 2}) { + movies(limit: 1, offset: 2) { title } } @@ -111,7 +111,7 @@ RETURN this { [source,graphql,request=true] ---- query ($offset: Int, $limit: Int) { - movies(options: {limit: $limit, offset: $offset}) { + movies(limit: $limit, offset: $offset) { title } } @@ -151,7 +151,7 @@ RETURN this { [source,graphql,request=true] ---- query ($offset: Int, $limit: Int, $title: String) { - movies(options: {limit: $limit, offset: $offset}, where: {title: $title}) { + movies(limit: $limit, offset: $offset, where: {title_EQ: $title}) { title } } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/pagination.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/pagination.js.adoc index 2c852ea6..f9206fea 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/pagination.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/pagination.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID title: String } @@ -21,7 +21,7 @@ type Movie { [source,graphql,request=true] ---- { - movies(options: {offset: 1}) { + movies(offset: 1) { title } } @@ -51,7 +51,7 @@ RETURN this { .title } AS this [source,graphql,request=true] ---- { - movies(options: {limit: 1}) { + movies(limit: 1) { title } } @@ -81,7 +81,7 @@ RETURN this { .title } AS this [source,graphql,request=true] ---- { - movies(options: {limit: 1, offset: 2}) { + movies(limit: 1, offset: 2) { title } } @@ -113,7 +113,7 @@ RETURN this { .title } AS this [source,graphql,request=true] ---- query ($offset: Int, $limit: Int) { - movies(options: {limit: $limit, offset: $offset}) { + movies(limit: $limit, offset: $offset) { title } } @@ -154,7 +154,7 @@ RETURN this { .title } AS this [source,graphql,request=true] ---- query ($offset: Int, $limit: Int, $title: String) { - movies(options: {limit: $limit, offset: $offset}, where: {title: $title}) { + movies(limit: $limit, offset: $offset, where: {title_EQ: $title}) { title } } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/pagination/sort.adoc b/core/src/test/resources/tck-test-files/cypher/v2/pagination/sort.adoc new file mode 100644 index 00000000..52d25358 --- /dev/null +++ b/core/src/test/resources/tck-test-files/cypher/v2/pagination/sort.adoc @@ -0,0 +1,229 @@ +:toc: +:toclevels: 42 + += Sort + +== Setup + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + id: ID! + title: String! + runtime: Int! + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) + genres: [Genre!]! @relationship(type: "HAS_GENRE", direction: OUT) +} + +type Genre @node { + id: ID + name: String +} + +type Series @node { + id: ID! + title: String! + episodes: Int! +} + +type Actor @node { + id: ID! + name: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) +} +---- + +== should sort and project + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(sort: [{id: ASC}]) { + id + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ } +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WITH * ORDER BY this.id ASC +RETURN this { + .id, + .title +} AS this +---- + +== should sort and project, DESC + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(sort: [{id: DESC}]) { + id + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ } +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WITH * ORDER BY this.id DESC +RETURN this { + .id, + .title +} AS this +---- + +== should sort and project aliased fields + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(sort: [{id: DESC}]) { + aliased: id + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ } +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WITH * ORDER BY this.id DESC +RETURN this { + aliased: this.id, + .title +} AS this +---- + +== should sort with multiple criteria + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(sort: [{id: DESC}, {title: ASC}]) { + id + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ } +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WITH * ORDER BY this.id DESC, this.title ASC +RETURN this { + .id, + .title +} AS this +---- + +== should sort related fields + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies { + genres(sort: [{name: ASC}]) { + name + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ } +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +CALL { + WITH this + MATCH (this)-[hasGenre0:HAS_GENRE]->(genre0:Genre) + WITH genre0 { + .name + } AS genres ORDER BY genres.name ASC + RETURN collect(genres) AS genres +} +RETURN this { + genres: genres +} AS this +---- + +== should sort related fields, DESC + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies { + genres(sort: [{name: DESC}]) { + name + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ } +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +CALL { + WITH this + MATCH (this)-[hasGenre0:HAS_GENRE]->(genre0:Genre) + WITH genre0 { + .name + } AS genres ORDER BY genres.name DESC + RETURN collect(genres) AS genres +} +RETURN this { + genres: genres +} AS this +---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/pagination/sort.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/pagination/sort.js.adoc new file mode 100644 index 00000000..baca6e3a --- /dev/null +++ b/core/src/test/resources/tck-test-files/cypher/v2/pagination/sort.js.adoc @@ -0,0 +1,216 @@ +// This file was generated by the Test-Case extractor of neo4j-graphql +:toc: +:toclevels: 42 + += Sort + +== Setup + +.Schema +[source,graphql,schema=true] +---- +type Movie @node { + id: ID! + title: String! + runtime: Int! + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) + genres: [Genre!]! @relationship(type: "HAS_GENRE", direction: OUT) +} + +type Genre @node { + id: ID + name: String +} + +type Series @node { + id: ID! + title: String! + episodes: Int! +} + +type Actor @node { + id: ID! + name: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) +} +---- + +== should sort and project + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(sort: [{id: ASC}]) { + id + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WITH * +ORDER BY this.id ASC +RETURN this { .id, .title } AS this +---- + +== should sort and project, DESC + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(sort: [{id: DESC}]) { + id + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WITH * +ORDER BY this.id DESC +RETURN this { .id, .title } AS this +---- + +== should sort and project aliased fields + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(sort: [{id: DESC}]) { + aliased: id + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WITH * +ORDER BY this.id DESC +RETURN this { .title, .id, aliased: this.id } AS this +---- + +== should sort with multiple criteria + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(sort: [{id: DESC}, {title: ASC}]) { + id + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WITH * +ORDER BY this.id DESC, this.title ASC +RETURN this { .id, .title } AS this +---- + +== should sort related fields + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies { + genres(sort: [{name: ASC}]) { + name + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +CALL { + WITH this + MATCH (this)-[this0:HAS_GENRE]->(this1:Genre) + WITH this1 { .name } AS this1 + ORDER BY this1.name ASC + RETURN collect(this1) AS var2 +} +RETURN this { genres: var2 } AS this +---- + +== should sort related fields, DESC + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies { + genres(sort: [{name: DESC}]) { + name + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +CALL { + WITH this + MATCH (this)-[this0:HAS_GENRE]->(this1:Genre) + WITH this1 { .name } AS this1 + ORDER BY this1.name DESC + RETURN collect(this1) AS var2 +} +RETURN this { genres: var2 } AS this +---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/rfcs/query-limits.adoc b/core/src/test/resources/tck-test-files/cypher/v2/rfcs/query-limits.adoc index ffee324d..3fc72958 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/rfcs/query-limits.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/rfcs/query-limits.adoc @@ -8,20 +8,20 @@ .Schema [source,graphql,schema=true] ---- -type Movie @limit(default: 3, max: 5) { +type Movie @limit(default: 3, max: 5) @node { id: ID! actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) } -type Person @limit(default: 2) { +type Person @limit(default: 2) @node { id: ID! } -type Show @limit(max: 2) { +type Show @limit(max: 2) @node { id: ID! } -type Festival { +type Festival @node { name: String! shows: [Show!]! @relationship(type: "PART_OF", direction: IN) } @@ -95,7 +95,7 @@ RETURN this { [source,graphql,request=true] ---- { - shows(options: {limit: 5}) { + shows(limit: 5) { id } } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/rfcs/query-limits.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/rfcs/query-limits.js.adoc index 79e260af..857dd3c0 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/rfcs/query-limits.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/rfcs/query-limits.js.adoc @@ -9,20 +9,20 @@ .Schema [source,graphql,schema=true] ---- -type Movie @limit(default: 3, max: 5) { +type Movie @limit(default: 3, max: 5) @node { id: ID! actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) } -type Person @limit(default: 2) { +type Person @limit(default: 2) @node { id: ID! } -type Show @limit(max: 2) { +type Show @limit(max: 2) @node { id: ID! } -type Festival { +type Festival @node { name: String! shows: [Show!]! @relationship(type: "PART_OF", direction: IN) } @@ -96,7 +96,7 @@ RETURN this { .id } AS this [source,graphql,request=true] ---- { - shows(options: {limit: 5}) { + shows(limit: 5) { id } } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/rfcs/rfc-022.adoc b/core/src/test/resources/tck-test-files/cypher/v2/rfcs/rfc-022.adoc index f9bea486..29dbe383 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/rfcs/rfc-022.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/rfcs/rfc-022.adoc @@ -10,14 +10,14 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! released: Int actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") directors: [Person!]! @relationship(type: "DIRECTED", direction: IN) } -type Person { +type Person @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") directed: [Movie!]! @relationship(type: "DIRECTED", direction: OUT) @@ -34,9 +34,9 @@ type ActedIn @relationshipProperties { [source,graphql,request=true] ---- query Query { - movies(where: {released: 1999}) { + movies(where: {released_EQ: 1999}) { title - actors(where: {name: "Keanu Reeves"}) { + actors(where: {name_EQ: "Keanu Reeves"}) { name } } @@ -78,9 +78,9 @@ RETURN this { [source,graphql,request=true] ---- query Query { - movies(where: {released: 1999}) { + movies(where: {released_EQ: 1999}) { title - actors(where: {name: "Keanu Reeves"}) { + actors(where: {name_EQ: "Keanu Reeves"}) { name directed { title diff --git a/core/src/test/resources/tck-test-files/cypher/v2/rfcs/rfc-022.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/rfcs/rfc-022.js.adoc index 81d89dfa..43245fbe 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/rfcs/rfc-022.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/rfcs/rfc-022.js.adoc @@ -11,14 +11,14 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! released: Int actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") directors: [Person!]! @relationship(type: "DIRECTED", direction: IN) } -type Person { +type Person @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") directed: [Movie!]! @relationship(type: "DIRECTED", direction: OUT) @@ -35,9 +35,9 @@ type ActedIn @relationshipProperties { [source,graphql,request=true] ---- query Query { - movies(where: {released: 1999}) { + movies(where: {released_EQ: 1999}) { title - actors(where: {name: "Keanu Reeves"}) { + actors(where: {name_EQ: "Keanu Reeves"}) { name } } @@ -74,9 +74,9 @@ RETURN this { .title, actors: var2 } AS this [source,graphql,request=true] ---- query Query { - movies(where: {released: 1999}) { + movies(where: {released_EQ: 1999}) { title - actors(where: {name: "Keanu Reeves"}) { + actors(where: {name_EQ: "Keanu Reeves"}) { name directed { title diff --git a/core/src/test/resources/tck-test-files/cypher/v2/root-connection.adoc b/core/src/test/resources/tck-test-files/cypher/v2/root-connection.adoc index b801fb44..0245b41a 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/root-connection.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/root-connection.adoc @@ -8,13 +8,13 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID title: String actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -26,7 +26,7 @@ type Actor { [source,graphql,request=true] ---- { - moviesConnection(where: {title: "River Runs Through It, A"}) { + moviesConnection(where: {title_EQ: "River Runs Through It, A"}) { totalCount edges { node { diff --git a/core/src/test/resources/tck-test-files/cypher/v2/root-connection.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/root-connection.js.adoc index 8a195006..2fb3b86d 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/root-connection.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/root-connection.js.adoc @@ -9,13 +9,13 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID title: String actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -27,7 +27,7 @@ type Actor { [source,graphql,request=true] ---- { - moviesConnection(where: {title: "River Runs Through It, A"}) { + moviesConnection(where: {title_EQ: "River Runs Through It, A"}) { totalCount edges { node { diff --git a/core/src/test/resources/tck-test-files/cypher/v2/simple.adoc b/core/src/test/resources/tck-test-files/cypher/v2/simple.adoc index 347657b9..5f4da21f 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/simple.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/simple.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID title: String } @@ -20,7 +20,7 @@ type Movie { [source,graphql,request=true] ---- { - movies(where: {title: "River Runs Through It, A"}) { + movies(where: {title_EQ: "River Runs Through It, A"}) { title } } @@ -50,7 +50,7 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {title: "River Runs Through It, A"}) { + movies(where: {title_EQ: "River Runs Through It, A"}) { id title } @@ -82,7 +82,7 @@ RETURN this { [source,graphql,request=true] ---- query ($title: String) { - movies(where: {title: $title}) { + movies(where: {title_EQ: $title}) { id title } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/simple.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/simple.js.adoc index e39d3268..0aba8ceb 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/simple.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/simple.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID title: String } @@ -21,7 +21,7 @@ type Movie { [source,graphql,request=true] ---- { - movies(where: {title: "River Runs Through It, A"}) { + movies(where: {title_EQ: "River Runs Through It, A"}) { title } } @@ -49,7 +49,7 @@ RETURN this { .title } AS this [source,graphql,request=true] ---- { - movies(where: {title: "River Runs Through It, A"}) { + movies(where: {title_EQ: "River Runs Through It, A"}) { id title } @@ -78,7 +78,7 @@ RETURN this { .id, .title } AS this [source,graphql,request=true] ---- query ($title: String) { - movies(where: {title: $title}) { + movies(where: {title_EQ: $title}) { id title } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/types/bigint.adoc b/core/src/test/resources/tck-test-files/cypher/v2/types/bigint.adoc index 03465c5c..b6eb98d8 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/types/bigint.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/types/bigint.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type File { +type File @node { name: String! size: BigInt! } @@ -20,7 +20,7 @@ type File { [source,graphql,request=true] ---- { - files(where: {size: 9223372036854775807}) { + files(where: {size_EQ: 9223372036854775807}) { name } } @@ -50,7 +50,7 @@ RETURN this { [source,graphql,request=true] ---- { - files(where: {size: "9223372036854775807"}) { + files(where: {size_EQ: "9223372036854775807"}) { name } } @@ -80,7 +80,7 @@ RETURN this { [source,graphql,request=true] ---- query Files($size: BigInt) { - files(where: {size: $size}) { + files(where: {size_EQ: $size}) { name } } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/types/bigint.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/types/bigint.js.adoc index 7c4ee328..4e8d4ac5 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/types/bigint.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/types/bigint.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type File { +type File @node { name: String! size: BigInt! } @@ -21,7 +21,7 @@ type File { [source,graphql,request=true] ---- { - files(where: {size: 9223372036854775807}) { + files(where: {size_EQ: 9223372036854775807}) { name } } @@ -49,7 +49,7 @@ RETURN this { .name } AS this [source,graphql,request=true] ---- { - files(where: {size: "9223372036854775807"}) { + files(where: {size_EQ: "9223372036854775807"}) { name } } @@ -77,7 +77,7 @@ RETURN this { .name } AS this [source,graphql,request=true] ---- query Files($size: BigInt) { - files(where: {size: $size}) { + files(where: {size_EQ: $size}) { name } } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/types/date.adoc b/core/src/test/resources/tck-test-files/cypher/v2/types/date.adoc index 52e1bb2f..d724b25b 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/types/date.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/types/date.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID date: Date } @@ -20,7 +20,7 @@ type Movie { [source,graphql,request=true] ---- { - movies(where: {date: "1970-01-01"}) { + movies(where: {date_EQ: "1970-01-01"}) { date } } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/types/date.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/types/date.js.adoc index e5ca3d7c..dad7de21 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/types/date.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/types/date.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID date: Date } @@ -21,7 +21,7 @@ type Movie { [source,graphql,request=true] ---- { - movies(where: {date: "1970-01-01"}) { + movies(where: {date_EQ: "1970-01-01"}) { date } } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/types/datetime.adoc b/core/src/test/resources/tck-test-files/cypher/v2/types/datetime.adoc index 548dd93e..d7ccff3d 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/types/datetime.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/types/datetime.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID datetime: DateTime } @@ -20,7 +20,7 @@ type Movie { [source,graphql,request=true] ---- { - movies(where: {datetime: "1970-01-01T00:00:00.000Z"}) { + movies(where: {datetime_EQ: "1970-01-01T00:00:00.000Z"}) { datetime } } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/types/datetime.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/types/datetime.js.adoc index d1180df9..9029b4ac 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/types/datetime.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/types/datetime.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID datetime: DateTime } @@ -21,7 +21,7 @@ type Movie { [source,graphql,request=true] ---- { - movies(where: {datetime: "1970-01-01T00:00:00.000Z"}) { + movies(where: {datetime_EQ: "1970-01-01T00:00:00.000Z"}) { datetime } } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/types/duration.adoc b/core/src/test/resources/tck-test-files/cypher/v2/types/duration.adoc index 4879b08e..0abb2786 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/types/duration.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/types/duration.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID duration: Duration } @@ -20,7 +20,7 @@ type Movie { [source,graphql,request=true] ---- { - movies(where: {duration: "P1Y"}) { + movies(where: {duration_EQ: "P1Y"}) { duration } } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/types/duration.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/types/duration.js.adoc index 96176a5f..64bdd3e4 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/types/duration.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/types/duration.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID duration: Duration } @@ -21,7 +21,7 @@ type Movie { [source,graphql,request=true] ---- { - movies(where: {duration: "P1Y"}) { + movies(where: {duration_EQ: "P1Y"}) { duration } } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/types/localdatetime.adoc b/core/src/test/resources/tck-test-files/cypher/v2/types/localdatetime.adoc index 6f327a33..97bc340b 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/types/localdatetime.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/types/localdatetime.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID localDT: LocalDateTime } @@ -20,7 +20,7 @@ type Movie { [source,graphql,request=true] ---- { - movies(where: {localDT: "2003-09-14T12:00:00"}) { + movies(where: {localDT_EQ: "2003-09-14T12:00:00"}) { localDT } } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/types/localdatetime.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/types/localdatetime.js.adoc index dccc4f1d..38091616 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/types/localdatetime.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/types/localdatetime.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID localDT: LocalDateTime } @@ -21,7 +21,7 @@ type Movie { [source,graphql,request=true] ---- { - movies(where: {localDT: "2003-09-14T12:00:00"}) { + movies(where: {localDT_EQ: "2003-09-14T12:00:00"}) { localDT } } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/types/localtime.adoc b/core/src/test/resources/tck-test-files/cypher/v2/types/localtime.adoc index 9ab6df2d..a1a8b8de 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/types/localtime.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/types/localtime.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID time: LocalTime } @@ -20,7 +20,7 @@ type Movie { [source,graphql,request=true] ---- { - movies(where: {time: "12:00:00"}) { + movies(where: {time_EQ: "12:00:00"}) { time } } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/types/localtime.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/types/localtime.js.adoc index d37145a6..b4904692 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/types/localtime.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/types/localtime.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID time: LocalTime } @@ -21,7 +21,7 @@ type Movie { [source,graphql,request=true] ---- { - movies(where: {time: "12:00:00"}) { + movies(where: {time_EQ: "12:00:00"}) { time } } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/types/point.adoc b/core/src/test/resources/tck-test-files/cypher/v2/types/point.adoc index be885cfb..3cbda70a 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/types/point.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/types/point.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type PointContainer { +type PointContainer @node { id: String point: Point } @@ -20,7 +20,7 @@ type PointContainer { [source,graphql,request=true] ---- { - pointContainers(where: {point: {longitude: 1.0, latitude: 2.0}}) { + pointContainers(where: {point_EQ: {longitude: 1.0, latitude: 2.0}}) { point { longitude latitude @@ -35,8 +35,8 @@ type PointContainer { ---- { "param0" : { - "longitude" : 1, - "latitude" : 2 + "longitude" : 1.0, + "latitude" : 2.0 } } ---- @@ -55,6 +55,45 @@ RETURN this { } AS this ---- +== Simple Point NOT query + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + pointContainers(where: {NOT: {point_EQ: {longitude: 1.0, latitude: 2.0}}}) { + point { + longitude + latitude + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : { + "longitude" : 1.0, + "latitude" : 2.0 + } +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:PointContainer) +WHERE NOT (this.point = point($param0)) +RETURN this { + point: CASE WHEN this.point IS NOT NULL THEN { + longitude: this.point.longitude, + latitude: this.point.latitude + } ELSE NULL END +} AS this +---- + == Simple Point IN query .GraphQL-Query @@ -76,8 +115,8 @@ RETURN this { ---- { "param0" : [ { - "longitude" : 1, - "latitude" : 2 + "longitude" : 1.0, + "latitude" : 2.0 } ] } ---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/types/point.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/types/point.js.adoc index e6ca9eb5..04d1d80f 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/types/point.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/types/point.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type PointContainer { +type PointContainer @node { id: String point: Point } @@ -21,7 +21,7 @@ type PointContainer { [source,graphql,request=true] ---- { - pointContainers(where: {point: {longitude: 1.0, latitude: 2.0}}) { + pointContainers(where: {point_EQ: {longitude: 1.0, latitude: 2.0}}) { point { longitude latitude @@ -47,10 +47,41 @@ type PointContainer { ---- MATCH (this:PointContainer) WHERE this.point = point($param0) -RETURN this { point: CASE - WHEN this.point IS NOT NULL THEN { point: this.point, crs: this.point.crs } - ELSE NULL -END } AS this +RETURN this { .point } AS this +---- + +== Simple Point NOT query + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + pointContainers(where: {NOT: {point_EQ: {longitude: 1.0, latitude: 2.0}}}) { + point { + longitude + latitude + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": { + "longitude": 1, + "latitude": 2 + } +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:PointContainer) +WHERE NOT (this.point = point($param0)) +RETURN this { .point } AS this ---- == Simple Point IN query @@ -87,10 +118,7 @@ END } AS this ---- MATCH (this:PointContainer) WHERE this.point IN [var0 IN $param0 | point(var0)] -RETURN this { point: CASE - WHEN this.point IS NOT NULL THEN { point: this.point, crs: this.point.crs } - ELSE NULL -END } AS this +RETURN this { .point } AS this ---- == tests using describe or point.describe @@ -131,10 +159,7 @@ END } AS this ---- MATCH (this:PointContainer) WHERE point.distance(this.point, point($param0.point)) < $param0.distance -RETURN this { point: CASE - WHEN this.point IS NOT NULL THEN { point: this.point } - ELSE NULL -END } AS this +RETURN this { .point } AS this ---- === Simple Point LTE query @@ -173,10 +198,7 @@ END } AS this ---- MATCH (this:PointContainer) WHERE point.distance(this.point, point($param0.point)) <= $param0.distance -RETURN this { point: CASE - WHEN this.point IS NOT NULL THEN { point: this.point } - ELSE NULL -END } AS this +RETURN this { .point } AS this ---- === Simple Point GT query @@ -215,10 +237,7 @@ END } AS this ---- MATCH (this:PointContainer) WHERE point.distance(this.point, point($param0.point)) > $param0.distance -RETURN this { point: CASE - WHEN this.point IS NOT NULL THEN { point: this.point } - ELSE NULL -END } AS this +RETURN this { .point } AS this ---- === Simple Point GTE query @@ -257,10 +276,7 @@ END } AS this ---- MATCH (this:PointContainer) WHERE point.distance(this.point, point($param0.point)) >= $param0.distance -RETURN this { point: CASE - WHEN this.point IS NOT NULL THEN { point: this.point } - ELSE NULL -END } AS this +RETURN this { .point } AS this ---- === Simple Point DISTANCE query @@ -299,8 +315,5 @@ END } AS this ---- MATCH (this:PointContainer) WHERE point.distance(this.point, point($param0.point)) = $param0.distance -RETURN this { point: CASE - WHEN this.point IS NOT NULL THEN { point: this.point } - ELSE NULL -END } AS this +RETURN this { .point } AS this ---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/types/points.adoc b/core/src/test/resources/tck-test-files/cypher/v2/types/points.adoc index 1da2111c..d113277d 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/types/points.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/types/points.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type PointContainer { +type PointContainer @node { id: String points: [Point] } @@ -20,7 +20,7 @@ type PointContainer { [source,graphql,request=true] ---- { - pointContainers(where: {points: [{longitude: 1.0, latitude: 2.0}]}) { + pointContainers(where: {points_EQ: [{longitude: 1.0, latitude: 2.0}]}) { points { longitude latitude @@ -35,8 +35,8 @@ type PointContainer { ---- { "param0" : [ { - "longitude" : 1, - "latitude" : 2 + "longitude" : 1.0, + "latitude" : 2.0 } ] } ---- @@ -55,6 +55,45 @@ RETURN this { } AS this ---- +== Simple Points NOT query + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + pointContainers(where: {NOT: {points_EQ: [{longitude: 1.0, latitude: 2.0}]}}) { + points { + longitude + latitude + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0" : [ { + "longitude" : 1.0, + "latitude" : 2.0 + } ] +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:PointContainer) +WHERE NOT (this.points = [p IN $param0 | point(p)]) +RETURN this { + points: CASE WHEN this.points IS NOT NULL THEN [p_var0 IN this.points | { + longitude: p_var0.longitude, + latitude: p_var0.latitude + }] ELSE NULL END +} AS this +---- + == Simple Points INCLUDES query .GraphQL-Query @@ -76,8 +115,8 @@ RETURN this { ---- { "param0" : { - "longitude" : 1, - "latitude" : 2 + "longitude" : 1.0, + "latitude" : 2.0 } } ---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/types/points.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/types/points.js.adoc index f97697bf..c60d7865 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/types/points.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/types/points.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type PointContainer { +type PointContainer @node { id: String points: [Point] } @@ -21,7 +21,7 @@ type PointContainer { [source,graphql,request=true] ---- { - pointContainers(where: {points: [{longitude: 1.0, latitude: 2.0}]}) { + pointContainers(where: {points_EQ: [{longitude: 1.0, latitude: 2.0}]}) { points { longitude latitude @@ -49,10 +49,43 @@ type PointContainer { ---- MATCH (this:PointContainer) WHERE this.points = [var0 IN $param0 | point(var0)] -RETURN this { points: CASE - WHEN this.points IS NOT NULL THEN [var1 IN this.points | { point: var1, crs: var1.crs }] - ELSE NULL -END } AS this +RETURN this { .points } AS this +---- + +== Simple Points NOT query + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + pointContainers(where: {NOT: {points_EQ: [{longitude: 1.0, latitude: 2.0}]}}) { + points { + longitude + latitude + } + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ + "param0": [ + { + "longitude": 1, + "latitude": 2 + } + ] +} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:PointContainer) +WHERE NOT (this.points = [var0 IN $param0 | point(var0)]) +RETURN this { .points } AS this ---- == Simple Points INCLUDES query @@ -87,8 +120,5 @@ END } AS this ---- MATCH (this:PointContainer) WHERE point($param0) IN this.points -RETURN this { points: CASE - WHEN this.points IS NOT NULL THEN [var0 IN this.points | { point: var0, crs: var0.crs }] - ELSE NULL -END } AS this +RETURN this { .points } AS this ---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/types/time.adoc b/core/src/test/resources/tck-test-files/cypher/v2/types/time.adoc index deb3adc2..d43c7f74 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/types/time.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/types/time.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID time: Time } @@ -20,7 +20,7 @@ type Movie { [source,graphql,request=true] ---- { - movies(where: {time: "12:00:00"}) { + movies(where: {time_EQ: "12:00:00"}) { time } } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/types/time.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/types/time.js.adoc index 70d28c39..df86d1a1 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/types/time.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/types/time.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID time: Time } @@ -21,7 +21,7 @@ type Movie { [source,graphql,request=true] ---- { - movies(where: {time: "12:00:00"}) { + movies(where: {time_EQ: "12:00:00"}) { time } } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/undirected-relationships/query-direction-connection.adoc b/core/src/test/resources/tck-test-files/cypher/v2/undirected-relationships/query-direction-connection.adoc index d7fca255..8f8188a8 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/undirected-relationships/query-direction-connection.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/undirected-relationships/query-direction-connection.adoc @@ -3,76 +3,14 @@ = QueryDirection in relationships connection -== query with directed and undirected relationships with a DEFAULT_UNDIRECTED +== query connection with a DIRECTED relationship .Schema [source,graphql,schema=true] ---- -type User { +type User @node { name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DEFAULT_UNDIRECTED) -} ----- - -.GraphQL-Query -[source,graphql,request=true] ----- -query FriendsAggregate { - users { - friendsConnection { - totalCount - } - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ } ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:User) -CALL { - WITH this - MATCH (this)-[friendsWith0:FRIENDS_WITH]-(user0:User) - WITH collect( { - node: user0, - relationship: friendsWith0 - }) AS edges - WITH edges, size(edges) AS totalCount - CALL { - WITH edges - UNWIND edges AS edge - WITH edge.node AS user0, edge.relationship AS friendsWith0 - RETURN collect( { - node: { - __id: elementId(user0), - __typename: 'User' - } - }) AS friendsConnectionEdges - } - RETURN { - edges: friendsConnectionEdges, - totalCount: totalCount - } AS friendsConnection -} -RETURN this { - friendsConnection: friendsConnection -} AS this ----- - -== query connection with a DIRECTED_ONLY relationship - -.Schema -[source,graphql,schema=true] ----- -type User { - name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DIRECTED_ONLY) + friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DIRECTED) } ---- @@ -127,14 +65,14 @@ RETURN this { } AS this ---- -== query with a UNDIRECTED_ONLY relationship +== query with a UNDIRECTED relationship .Schema [source,graphql,schema=true] ---- -type User { +type User @node { name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: UNDIRECTED_ONLY) + friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: UNDIRECTED) } ---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/undirected-relationships/query-direction-connection.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/undirected-relationships/query-direction-connection.js.adoc index e9521d69..3c224509 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/undirected-relationships/query-direction-connection.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/undirected-relationships/query-direction-connection.js.adoc @@ -4,63 +4,14 @@ = QueryDirection in relationships connection -== query with directed and undirected relationships with a DEFAULT_UNDIRECTED +== query connection with a DIRECTED relationship .Schema [source,graphql,schema=true] ---- -type User { +type User @node { name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DEFAULT_UNDIRECTED) -} ----- - -.GraphQL-Query -[source,graphql,request=true] ----- -query FriendsAggregate { - users { - friendsConnection { - totalCount - } - } -} ----- - -.Expected Cypher params -[source,json] ----- -{} ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:User) -CALL { - WITH this - MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) - WITH collect({ node: this1, relationship: this0 }) AS edges - WITH edges, size(edges) AS totalCount - CALL { - WITH edges - UNWIND edges AS edge - WITH edge.node AS this1, edge.relationship AS this0 - RETURN collect({ node: { __id: toString(id(this1)), __typename: "User" } }) AS var2 - } - RETURN { edges: var2, totalCount: totalCount } AS var3 -} -RETURN this { friendsConnection: var3 } AS this ----- - -== query connection with a DIRECTED_ONLY relationship - -.Schema -[source,graphql,schema=true] ----- -type User { - name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DIRECTED_ONLY) + friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DIRECTED) } ---- @@ -102,14 +53,14 @@ CALL { RETURN this { friendsConnection: var3 } AS this ---- -== query with a UNDIRECTED_ONLY relationship +== query with a UNDIRECTED relationship .Schema [source,graphql,schema=true] ---- -type User { +type User @node { name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: UNDIRECTED_ONLY) + friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: UNDIRECTED) } ---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/undirected-relationships/query-direction.adoc b/core/src/test/resources/tck-test-files/cypher/v2/undirected-relationships/query-direction.adoc index bbf64c8a..ff4adab8 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/undirected-relationships/query-direction.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/undirected-relationships/query-direction.adoc @@ -1,19 +1,23 @@ :toc: :toclevels: 42 -= QueryDirection in relationships += queryDirection in relationships -== query with directed and undirected relationships with DEFAULT_UNDIRECTED +== DIRECTED + +=== Setup .Schema [source,graphql,schema=true] ---- -type User { +type User @node { name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DEFAULT_UNDIRECTED) + friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DIRECTED) } ---- +=== query + .GraphQL-Query [source,graphql,request=true] ---- @@ -23,9 +27,6 @@ type User { friends: friends { name } - directedFriends: friends(directed: true) { - name - } } } ---- @@ -42,48 +43,27 @@ type User { MATCH (this:User) CALL { WITH this - MATCH (this)-[friendsWith0:FRIENDS_WITH]-(user0:User) + MATCH (this)-[friendsWith0:FRIENDS_WITH]->(user0:User) WITH user0 { .name } AS friends RETURN collect(friends) AS friends } -CALL { - WITH this - MATCH (this)-[friendsWith1:FRIENDS_WITH]->(user1:User) - WITH user1 { - .name - } AS directedFriends - RETURN collect(directedFriends) AS directedFriends -} RETURN this { .name, - friends: friends, - directedFriends: directedFriends + friends: friends } AS this ---- -== query with directed and undirected relationships with a DEFAULT_DIRECTED - -.Schema -[source,graphql,schema=true] ----- -type User { - name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DEFAULT_DIRECTED) -} ----- +=== query with filter .GraphQL-Query [source,graphql,request=true] ---- { - users { + users(where: {friends_SOME: {name: "John Smith"}}) { name - friends: friends { - name - } - undirectedFriends: friends(directed: false) { + friends { name } } @@ -93,13 +73,19 @@ type User { .Expected Cypher params [source,json] ---- -{ } +{ + "param0" : "John Smith" +} ---- .Expected Cypher output [source,cypher] ---- MATCH (this:User) +WHERE EXISTS { + MATCH (this)-[:FRIENDS_WITH]->(this0:User) + WHERE this0.name = $param0 +} CALL { WITH this MATCH (this)-[friendsWith0:FRIENDS_WITH]->(user0:User) @@ -108,32 +94,27 @@ CALL { } AS friends RETURN collect(friends) AS friends } -CALL { - WITH this - MATCH (this)-[friendsWith1:FRIENDS_WITH]-(user1:User) - WITH user1 { - .name - } AS undirectedFriends - RETURN collect(undirectedFriends) AS undirectedFriends -} RETURN this { .name, - friends: friends, - undirectedFriends: undirectedFriends + friends: friends } AS this ---- -== query with a DIRECTED_ONLY relationship +== UNDIRECTED + +=== Setup .Schema [source,graphql,schema=true] ---- -type User { +type User @node { name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DIRECTED_ONLY) + friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: UNDIRECTED) } ---- +=== query + .GraphQL-Query [source,graphql,request=true] ---- @@ -159,7 +140,7 @@ type User { MATCH (this:User) CALL { WITH this - MATCH (this)-[friendsWith0:FRIENDS_WITH]->(user0:User) + MATCH (this)-[friendsWith0:FRIENDS_WITH]-(user0:User) WITH user0 { .name } AS friends @@ -171,24 +152,15 @@ RETURN this { } AS this ---- -== query with a UNDIRECTED_ONLY relationship - -.Schema -[source,graphql,schema=true] ----- -type User { - name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: UNDIRECTED_ONLY) -} ----- +=== query with filter .GraphQL-Query [source,graphql,request=true] ---- { - users { + users(where: {friends_SOME: {name: "John Smith"}}) { name - friends: friends { + friends { name } } @@ -198,13 +170,19 @@ type User { .Expected Cypher params [source,json] ---- -{ } +{ + "param0" : "John Smith" +} ---- .Expected Cypher output [source,cypher] ---- MATCH (this:User) +WHERE EXISTS { + MATCH (this)-[:FRIENDS_WITH]-(this0:User) + WHERE this0.name = $param0 +} CALL { WITH this MATCH (this)-[friendsWith0:FRIENDS_WITH]-(user0:User) diff --git a/core/src/test/resources/tck-test-files/cypher/v2/undirected-relationships/query-direction.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/undirected-relationships/query-direction.js.adoc index e8f7d707..54dbc452 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/undirected-relationships/query-direction.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/undirected-relationships/query-direction.js.adoc @@ -2,19 +2,23 @@ :toc: :toclevels: 42 -= QueryDirection in relationships += queryDirection in relationships -== query with directed and undirected relationships with DEFAULT_UNDIRECTED +== DIRECTED + +=== Setup .Schema [source,graphql,schema=true] ---- -type User { +type User @node { name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DEFAULT_UNDIRECTED) + friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DIRECTED) } ---- +=== query + .GraphQL-Query [source,graphql,request=true] ---- @@ -24,9 +28,6 @@ type User { friends: friends { name } - directedFriends: friends(directed: true) { - name - } } } ---- @@ -34,7 +35,7 @@ type User { .Expected Cypher params [source,json] ---- -{} +{ } ---- .Expected Cypher output @@ -42,41 +43,28 @@ type User { ---- MATCH (this:User) CALL { - WITH this - MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) - WITH this1 { .name } AS this1 - RETURN collect(this1) AS var2 + WITH this + MATCH (this)-[this0:FRIENDS_WITH]->(this1:User) + WITH this1 { + .name + } AS this1 + RETURN collect(this1) AS var2 } -CALL { - WITH this - MATCH (this)-[this3:FRIENDS_WITH]->(this4:User) - WITH this4 { .name } AS this4 - RETURN collect(this4) AS var5 -} -RETURN this { .name, friends: var2, directedFriends: var5 } AS this +RETURN this { + .name, + friends: var2 +} AS this ---- -== query with directed and undirected relationships with a DEFAULT_DIRECTED - -.Schema -[source,graphql,schema=true] ----- -type User { - name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DEFAULT_DIRECTED) -} ----- +=== query with filter .GraphQL-Query [source,graphql,request=true] ---- { - users { + users(where: {friends_SOME: {name: "John Smith"}}) { name - friends: friends { - name - } - undirectedFriends: friends(directed: false) { + friends { name } } @@ -86,39 +74,48 @@ type User { .Expected Cypher params [source,json] ---- -{} +{ + "param0" : "John Smith" +} ---- .Expected Cypher output [source,cypher] ---- MATCH (this:User) -CALL { - WITH this - MATCH (this)-[this0:FRIENDS_WITH]->(this1:User) - WITH this1 { .name } AS this1 - RETURN collect(this1) AS var2 +WHERE EXISTS { + MATCH (this)-[:FRIENDS_WITH]->(this0:User) + WHERE this0.name = $param0 } CALL { - WITH this - MATCH (this)-[this3:FRIENDS_WITH]-(this4:User) - WITH this4 { .name } AS this4 - RETURN collect(this4) AS var5 + WITH this + MATCH (this)-[this1:FRIENDS_WITH]->(this2:User) + WITH this2 { + .name + } AS this2 + RETURN collect(this2) AS var3 } -RETURN this { .name, friends: var2, undirectedFriends: var5 } AS this +RETURN this { + .name, + friends: var3 +} AS this ---- -== query with a DIRECTED_ONLY relationship +== UNDIRECTED + +=== Setup .Schema [source,graphql,schema=true] ---- -type User { +type User @node { name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DIRECTED_ONLY) + friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: UNDIRECTED) } ---- +=== query + .GraphQL-Query [source,graphql,request=true] ---- @@ -135,7 +132,7 @@ type User { .Expected Cypher params [source,json] ---- -{} +{ } ---- .Expected Cypher output @@ -143,32 +140,28 @@ type User { ---- MATCH (this:User) CALL { - WITH this - MATCH (this)-[this0:FRIENDS_WITH]->(this1:User) - WITH this1 { .name } AS this1 - RETURN collect(this1) AS var2 + WITH this + MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) + WITH this1 { + .name + } AS this1 + RETURN collect(this1) AS var2 } -RETURN this { .name, friends: var2 } AS this +RETURN this { + .name, + friends: var2 +} AS this ---- -== query with a UNDIRECTED_ONLY relationship - -.Schema -[source,graphql,schema=true] ----- -type User { - name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: UNDIRECTED_ONLY) -} ----- +=== query with filter .GraphQL-Query [source,graphql,request=true] ---- { - users { + users(where: {friends_SOME: {name: "John Smith"}}) { name - friends: friends { + friends { name } } @@ -178,18 +171,29 @@ type User { .Expected Cypher params [source,json] ---- -{} +{ + "param0" : "John Smith" +} ---- .Expected Cypher output [source,cypher] ---- MATCH (this:User) +WHERE EXISTS { + MATCH (this)-[:FRIENDS_WITH]-(this0:User) + WHERE this0.name = $param0 +} CALL { - WITH this - MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) - WITH this1 { .name } AS this1 - RETURN collect(this1) AS var2 + WITH this + MATCH (this)-[this1:FRIENDS_WITH]-(this2:User) + WITH this2 { + .name + } AS this2 + RETURN collect(this2) AS var3 } -RETURN this { .name, friends: var2 } AS this +RETURN this { + .name, + friends: var3 +} AS this ---- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/undirected-relationships/undirected-connection.adoc b/core/src/test/resources/tck-test-files/cypher/v2/undirected-relationships/undirected-connection.adoc deleted file mode 100644 index 8fe2e6e9..00000000 --- a/core/src/test/resources/tck-test-files/cypher/v2/undirected-relationships/undirected-connection.adoc +++ /dev/null @@ -1,66 +0,0 @@ -:toc: -:toclevels: 42 - -= Undirected connections - -== query with undirected aggregation - -.Schema -[source,graphql,schema=true] ----- -type User { - name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT) -} ----- - -.GraphQL-Query -[source,graphql,request=true] ----- -query FriendsAggregate { - users { - friendsConnection(directed: false) { - totalCount - } - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ } ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:User) -CALL { - WITH this - MATCH (this)-[friendsWith0:FRIENDS_WITH]-(user0:User) - WITH collect( { - node: user0, - relationship: friendsWith0 - }) AS edges - WITH edges, size(edges) AS totalCount - CALL { - WITH edges - UNWIND edges AS edge - WITH edge.node AS user0, edge.relationship AS friendsWith0 - RETURN collect( { - node: { - __id: elementId(user0), - __typename: 'User' - } - }) AS friendsConnectionEdges - } - RETURN { - edges: friendsConnectionEdges, - totalCount: totalCount - } AS friendsConnection -} -RETURN this { - friendsConnection: friendsConnection -} AS this ----- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/undirected-relationships/undirected-connection.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/undirected-relationships/undirected-connection.js.adoc deleted file mode 100644 index e1bb5c43..00000000 --- a/core/src/test/resources/tck-test-files/cypher/v2/undirected-relationships/undirected-connection.js.adoc +++ /dev/null @@ -1,54 +0,0 @@ -// This file was generated by the Test-Case extractor of neo4j-graphql -:toc: -:toclevels: 42 - -= Undirected connections - -== query with undirected aggregation - -.Schema -[source,graphql,schema=true] ----- -type User { - name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT) -} ----- - -.GraphQL-Query -[source,graphql,request=true] ----- -query FriendsAggregate { - users { - friendsConnection(directed: false) { - totalCount - } - } -} ----- - -.Expected Cypher params -[source,json] ----- -{} ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:User) -CALL { - WITH this - MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) - WITH collect({ node: this1, relationship: this0 }) AS edges - WITH edges, size(edges) AS totalCount - CALL { - WITH edges - UNWIND edges AS edge - WITH edge.node AS this1, edge.relationship AS this0 - RETURN collect({ node: { __id: toString(id(this1)), __typename: "User" } }) AS var2 - } - RETURN { edges: var2, totalCount: totalCount } AS var3 -} -RETURN this { friendsConnection: var3 } AS this ----- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/undirected-relationships/undirected-relationships.adoc b/core/src/test/resources/tck-test-files/cypher/v2/undirected-relationships/undirected-relationships.adoc deleted file mode 100644 index aef7a3dd..00000000 --- a/core/src/test/resources/tck-test-files/cypher/v2/undirected-relationships/undirected-relationships.adoc +++ /dev/null @@ -1,223 +0,0 @@ -:toc: -:toclevels: 42 - -= Undirected relationships - -== query with directed and undirected relationships - -.Schema -[source,graphql,schema=true] ----- -type User { - name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT) -} ----- - -.GraphQL-Query -[source,graphql,request=true] ----- -{ - users { - name - friends: friends(directed: false) { - name - } - directedFriends: friends { - name - } - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ } ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:User) -CALL { - WITH this - MATCH (this)-[friendsWith0:FRIENDS_WITH]-(user0:User) - WITH user0 { - .name - } AS friends - RETURN collect(friends) AS friends -} -CALL { - WITH this - MATCH (this)-[friendsWith1:FRIENDS_WITH]->(user1:User) - WITH user1 { - .name - } AS directedFriends - RETURN collect(directedFriends) AS directedFriends -} -RETURN this { - .name, - friends: friends, - directedFriends: directedFriends -} AS this ----- - -== undirected with unions - -.Schema -[source,graphql,schema=true] ----- -union Content = Blog | Post - -type Blog { - title: String - posts: [Post!]! @relationship(type: "HAS_POST", direction: OUT) -} - -type Post { - content: String -} - -type User { - name: String - content: [Content!]! @relationship(type: "HAS_CONTENT", direction: OUT) -} ----- - -.GraphQL-Query -[source,graphql,request=true] ----- -query Users { - users { - content(directed: false) { - ... on Blog { - title - } - ... on Post { - content - } - } - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ } ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:User) -CALL { - WITH this - CALL { - WITH * - MATCH (this)-[hasContent0:HAS_CONTENT]-(blog0:Blog) - WITH blog0 { - __typename: 'Blog', - __id: elementId(blog0), - .title - } AS blog0 - RETURN blog0 AS content0 UNION - WITH * - MATCH (this)-[hasContent1:HAS_CONTENT]-(post0:Post) - WITH post0 { - __typename: 'Post', - __id: elementId(post0), - .content - } AS post0 - RETURN post0 AS content0 - } - WITH content0 - RETURN collect(content0) AS content0 -} -RETURN this { - content: content0 -} AS this ----- - -== undirected with interfaces - -.Schema -[source,graphql,schema=true] ----- -interface Production { - title: String! - actors: [Actor!]! -} - -type Movie implements Production { - title: String! - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") - runtime: Int! -} - -type Series implements Production { - title: String! - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") - episodes: Int! -} - -type ActedIn @relationshipProperties { - role: String! -} - -type Actor { - name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") -} ----- - -.GraphQL-Query -[source,graphql,request=true] ----- -query Actors { - actors { - actedIn(directed: false) { - title - } - } -} ----- - -.Expected Cypher params -[source,json] ----- -{ } ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:Actor) -CALL { - WITH this - CALL { - WITH * - MATCH (this)-[actedIn0:ACTED_IN]-(movie0:Movie) - WITH movie0 { - __typename: 'Movie', - __id: elementId(movie0), - .title - } AS movie0 - RETURN movie0 AS actedIn UNION - WITH * - MATCH (this)-[actedIn1:ACTED_IN]-(series0:Series) - WITH series0 { - __typename: 'Series', - __id: elementId(series0), - .title - } AS series0 - RETURN series0 AS actedIn - } - WITH actedIn - RETURN collect(actedIn) AS actedIn -} -RETURN this { - actedIn: actedIn -} AS this ----- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/undirected-relationships/undirected-relationships.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/undirected-relationships/undirected-relationships.js.adoc deleted file mode 100644 index ee139d90..00000000 --- a/core/src/test/resources/tck-test-files/cypher/v2/undirected-relationships/undirected-relationships.js.adoc +++ /dev/null @@ -1,198 +0,0 @@ -// This file was generated by the Test-Case extractor of neo4j-graphql -:toc: -:toclevels: 42 - -= Undirected relationships - -== query with directed and undirected relationships - -.Schema -[source,graphql,schema=true] ----- -type User { - name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT) -} ----- - -.GraphQL-Query -[source,graphql,request=true] ----- -{ - users { - name - friends: friends(directed: false) { - name - } - directedFriends: friends { - name - } - } -} ----- - -.Expected Cypher params -[source,json] ----- -{} ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:User) -CALL { - WITH this - MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) - WITH this1 { .name } AS this1 - RETURN collect(this1) AS var2 -} -CALL { - WITH this - MATCH (this)-[this3:FRIENDS_WITH]->(this4:User) - WITH this4 { .name } AS this4 - RETURN collect(this4) AS var5 -} -RETURN this { .name, friends: var2, directedFriends: var5 } AS this ----- - -== undirected with unions - -.Schema -[source,graphql,schema=true] ----- -union Content = Blog | Post - -type Blog { - title: String - posts: [Post!]! @relationship(type: "HAS_POST", direction: OUT) -} - -type Post { - content: String -} - -type User { - name: String - content: [Content!]! @relationship(type: "HAS_CONTENT", direction: OUT) -} ----- - -.GraphQL-Query -[source,graphql,request=true] ----- -query Users { - users { - content(directed: false) { - ... on Blog { - title - } - ... on Post { - content - } - } - } -} ----- - -.Expected Cypher params -[source,json] ----- -{} ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:User) -CALL { - WITH this - CALL { - WITH * - MATCH (this)-[this0:HAS_CONTENT]-(this1:Blog) - WITH this1 { .title, __typename: "Blog", __id: toString(id(this1)) } AS this1 - RETURN this1 AS var2 - UNION - WITH * - MATCH (this)-[this3:HAS_CONTENT]-(this4:Post) - WITH this4 { .content, __typename: "Post", __id: toString(id(this4)) } AS this4 - RETURN this4 AS var2 - } - WITH var2 - RETURN collect(var2) AS var2 -} -RETURN this { content: var2 } AS this ----- - -== undirected with interfaces - -.Schema -[source,graphql,schema=true] ----- -interface Production { - title: String! - actors: [Actor!]! -} - -type Movie implements Production { - title: String! - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") - runtime: Int! -} - -type Series implements Production { - title: String! - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") - episodes: Int! -} - -type ActedIn @relationshipProperties { - role: String! -} - -type Actor { - name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") -} ----- - -.GraphQL-Query -[source,graphql,request=true] ----- -query Actors { - actors { - actedIn(directed: false) { - title - } - } -} ----- - -.Expected Cypher params -[source,json] ----- -{} ----- - -.Expected Cypher output -[source,cypher] ----- -MATCH (this:Actor) -CALL { - WITH this - CALL { - WITH * - MATCH (this)-[this0:ACTED_IN]-(this1:Movie) - WITH this1 { .title, __typename: "Movie", __id: toString(id(this1)) } AS this1 - RETURN this1 AS var2 - UNION - WITH * - MATCH (this)-[this3:ACTED_IN]-(this4:Series) - WITH this4 { .title, __typename: "Series", __id: toString(id(this4)) } AS this4 - RETURN this4 AS var2 - } - WITH var2 - RETURN collect(var2) AS var2 -} -RETURN this { actedIn: var2 } AS this ----- diff --git a/core/src/test/resources/tck-test-files/cypher/v2/where.adoc b/core/src/test/resources/tck-test-files/cypher/v2/where.adoc index 59e30b4b..8d5c11b8 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/where.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/where.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } -type Movie { +type Movie @node { id: ID title: String actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) @@ -27,7 +27,7 @@ type Movie { [source,graphql,request=true] ---- query ($title: String, $isFavorite: Boolean) { - movies(where: {title: $title, isFavorite: $isFavorite}) { + movies(where: {title_EQ: $title, isFavorite_EQ: $isFavorite}) { title } } @@ -68,7 +68,7 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {AND: [{title: "some title"}]}) { + movies(where: {AND: [{title_EQ: "some title"}]}) { title } } @@ -98,7 +98,7 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {AND: [{title: "some title"}, {isFavorite: true}]}) { + movies(where: {AND: [{title_EQ: "some title"}, {isFavorite_EQ: true}]}) { title } } @@ -130,7 +130,7 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {AND: [{AND: [{title: "some title"}]}]}) { + movies(where: {AND: [{AND: [{title_EQ: "some title"}]}]}) { title } } @@ -160,7 +160,9 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {AND: [{AND: [{title: "some title"}, {title: "another title"}]}]}) { + movies( + where: {AND: [{AND: [{title_EQ: "some title"}, {title_EQ: "another title"}]}]} + ) { title } } @@ -192,7 +194,9 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {AND: [{OR: [{title: "some title"}, {isFavorite: true}], id: 2}]}) { + movies( + where: {AND: [{OR: [{title_EQ: "some title"}, {isFavorite_EQ: true}], id_EQ: 2}]} + ) { title } } @@ -226,7 +230,7 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {AND: [{AND: [{AND: [{title: "some title"}]}]}]}) { + movies(where: {AND: [{AND: [{AND: [{title_EQ: "some title"}]}]}]}) { title } } @@ -256,7 +260,7 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {OR: [{title: "some title"}]}) { + movies(where: {OR: [{title_EQ: "some title"}]}) { title } } @@ -286,7 +290,7 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {OR: [{OR: [{title: "some title"}]}]}) { + movies(where: {OR: [{OR: [{title_EQ: "some title"}]}]}) { title } } @@ -316,7 +320,7 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {OR: [{OR: [{OR: [{title: "some title"}]}]}]}) { + movies(where: {OR: [{OR: [{OR: [{title_EQ: "some title"}]}]}]}) { title } } @@ -348,7 +352,7 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {title: null}) { + movies(where: {title_EQ: null}) { title } } @@ -370,13 +374,41 @@ RETURN this { } AS this ---- +=== Match with not NULL in where + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {NOT: {title_EQ: null}}) { + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{ } +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE this.title IS NOT NULL +RETURN this { + .title +} AS this +---- + == Simple NOT .GraphQL-Query [source,graphql,request=true] ---- { - movies(where: {NOT: {title: "some title"}}) { + movies(where: {NOT: {title_EQ: "some title"}}) { title } } @@ -406,7 +438,7 @@ RETURN this { [source,graphql,request=true] ---- { - movies(where: {NOT: {title: "some title", isFavorite: false}}) { + movies(where: {NOT: {title_EQ: "some title", isFavorite_EQ: false}}) { title } } diff --git a/core/src/test/resources/tck-test-files/cypher/v2/where.js.adoc b/core/src/test/resources/tck-test-files/cypher/v2/where.js.adoc index 4812e98d..daf5eeda 100644 --- a/core/src/test/resources/tck-test-files/cypher/v2/where.js.adoc +++ b/core/src/test/resources/tck-test-files/cypher/v2/where.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } -type Movie { +type Movie @node { id: ID title: String actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) @@ -28,7 +28,7 @@ type Movie { [source,graphql,request=true] ---- query ($title: String, $isFavorite: Boolean) { - movies(where: {title: $title, isFavorite: $isFavorite}) { + movies(where: {title_EQ: $title, isFavorite_EQ: $isFavorite}) { title } } @@ -66,7 +66,7 @@ RETURN this { .title } AS this [source,graphql,request=true] ---- { - movies(where: {AND: [{title: "some title"}]}) { + movies(where: {AND: [{title_EQ: "some title"}]}) { title } } @@ -94,7 +94,7 @@ RETURN this { .title } AS this [source,graphql,request=true] ---- { - movies(where: {AND: [{title: "some title"}, {isFavorite: true}]}) { + movies(where: {AND: [{title_EQ: "some title"}, {isFavorite_EQ: true}]}) { title } } @@ -123,7 +123,7 @@ RETURN this { .title } AS this [source,graphql,request=true] ---- { - movies(where: {AND: [{AND: [{title: "some title"}]}]}) { + movies(where: {AND: [{AND: [{title_EQ: "some title"}]}]}) { title } } @@ -151,7 +151,9 @@ RETURN this { .title } AS this [source,graphql,request=true] ---- { - movies(where: {AND: [{AND: [{title: "some title"}, {title: "another title"}]}]}) { + movies( + where: {AND: [{AND: [{title_EQ: "some title"}, {title_EQ: "another title"}]}]} + ) { title } } @@ -180,7 +182,9 @@ RETURN this { .title } AS this [source,graphql,request=true] ---- { - movies(where: {AND: [{OR: [{title: "some title"}, {isFavorite: true}], id: 2}]}) { + movies( + where: {AND: [{OR: [{title_EQ: "some title"}, {isFavorite_EQ: true}], id_EQ: 2}]} + ) { title } } @@ -210,7 +214,7 @@ RETURN this { .title } AS this [source,graphql,request=true] ---- { - movies(where: {AND: [{AND: [{AND: [{title: "some title"}]}]}]}) { + movies(where: {AND: [{AND: [{AND: [{title_EQ: "some title"}]}]}]}) { title } } @@ -238,7 +242,7 @@ RETURN this { .title } AS this [source,graphql,request=true] ---- { - movies(where: {OR: [{title: "some title"}]}) { + movies(where: {OR: [{title_EQ: "some title"}]}) { title } } @@ -266,7 +270,7 @@ RETURN this { .title } AS this [source,graphql,request=true] ---- { - movies(where: {OR: [{OR: [{title: "some title"}]}]}) { + movies(where: {OR: [{OR: [{title_EQ: "some title"}]}]}) { title } } @@ -294,7 +298,7 @@ RETURN this { .title } AS this [source,graphql,request=true] ---- { - movies(where: {OR: [{OR: [{OR: [{title: "some title"}]}]}]}) { + movies(where: {OR: [{OR: [{OR: [{title_EQ: "some title"}]}]}]}) { title } } @@ -324,7 +328,7 @@ RETURN this { .title } AS this [source,graphql,request=true] ---- { - movies(where: {title: null}) { + movies(where: {title_EQ: null}) { title } } @@ -344,13 +348,39 @@ WHERE this.title IS NULL RETURN this { .title } AS this ---- +=== Match with not NULL in where + +.GraphQL-Query +[source,graphql,request=true] +---- +{ + movies(where: {NOT: {title_EQ: null}}) { + title + } +} +---- + +.Expected Cypher params +[source,json] +---- +{} +---- + +.Expected Cypher output +[source,cypher] +---- +MATCH (this:Movie) +WHERE NOT (this.title IS NULL) +RETURN this { .title } AS this +---- + == Simple NOT .GraphQL-Query [source,graphql,request=true] ---- { - movies(where: {NOT: {title: "some title"}}) { + movies(where: {NOT: {title_EQ: "some title"}}) { title } } @@ -378,7 +408,7 @@ RETURN this { .title } AS this [source,graphql,request=true] ---- { - movies(where: {NOT: {title: "some title", isFavorite: false}}) { + movies(where: {NOT: {title_EQ: "some title", isFavorite_EQ: false}}) { title } } diff --git a/core/src/test/resources/tck-test-files/schema/v2/aggregations.adoc b/core/src/test/resources/tck-test-files/schema/v2/aggregations.adoc index 5d6b3d83..433fac7c 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/aggregations.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/aggregations.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID isbn: String! title: String @@ -64,8 +64,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -94,13 +94,6 @@ scalar LocalTime "A time, represented as an RFC3339 time string" scalar Time -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { createdAt: SortDirection @@ -120,67 +113,78 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - createdAt: DateTime + createdAt: DateTime @deprecated(reason : "Please use the explicit _EQ version") + createdAt_EQ: DateTime createdAt_GT: DateTime createdAt_GTE: DateTime createdAt_IN: [DateTime] createdAt_LT: DateTime createdAt_LTE: DateTime - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - imdbRating: Float + imdbRating: Float @deprecated(reason : "Please use the explicit _EQ version") + imdbRating_EQ: Float imdbRating_GT: Float imdbRating_GTE: Float imdbRating_IN: [Float] imdbRating_LT: Float imdbRating_LTE: Float - isbn: String + isbn: String @deprecated(reason : "Please use the explicit _EQ version") isbn_CONTAINS: String isbn_ENDS_WITH: String + isbn_EQ: String isbn_IN: [String!] isbn_STARTS_WITH: String - screenTime: Duration + screenTime: Duration @deprecated(reason : "Please use the explicit _EQ version") + screenTime_EQ: Duration screenTime_GT: Duration screenTime_GTE: Duration screenTime_IN: [Duration] screenTime_LT: Duration screenTime_LTE: Duration - someBigInt: BigInt + someBigInt: BigInt @deprecated(reason : "Please use the explicit _EQ version") + someBigInt_EQ: BigInt someBigInt_GT: BigInt someBigInt_GTE: BigInt someBigInt_IN: [BigInt] someBigInt_LT: BigInt someBigInt_LTE: BigInt - someInt: Int + someInt: Int @deprecated(reason : "Please use the explicit _EQ version") + someInt_EQ: Int someInt_GT: Int someInt_GTE: Int someInt_IN: [Int] someInt_LT: Int someInt_LTE: Int - someLocalDateTime: LocalDateTime + someLocalDateTime: LocalDateTime @deprecated(reason : "Please use the explicit _EQ version") + someLocalDateTime_EQ: LocalDateTime someLocalDateTime_GT: LocalDateTime someLocalDateTime_GTE: LocalDateTime someLocalDateTime_IN: [LocalDateTime] someLocalDateTime_LT: LocalDateTime someLocalDateTime_LTE: LocalDateTime - someLocalTime: LocalTime + someLocalTime: LocalTime @deprecated(reason : "Please use the explicit _EQ version") + someLocalTime_EQ: LocalTime someLocalTime_GT: LocalTime someLocalTime_GTE: LocalTime someLocalTime_IN: [LocalTime] someLocalTime_LT: LocalTime someLocalTime_LTE: LocalTime - someTime: Time + someTime: Time @deprecated(reason : "Please use the explicit _EQ version") + someTime_EQ: Time someTime_GT: Time someTime_GTE: Time someTime_IN: [Time] someTime_LT: Time someTime_LTE: Time - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } @@ -192,7 +196,7 @@ input MovieWhere { .Schema [source,graphql,schema=true] ---- -type User { +type User @node { someId: ID someString: String someFloat: Float @@ -205,7 +209,7 @@ type User { someDuration: Duration } -type Post { +type Post @node { title: String likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } @@ -257,8 +261,8 @@ type PageInfo { } type Post { - likes(directed: Boolean = true, options: UserOptions, where: UserWhere): [User!]! - likesConnection(after: String, directed: Boolean = true, first: Int, sort: [PostLikesConnectionSort!], where: PostLikesConnectionWhere): PostLikesConnection! + likes(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! + likesConnection(after: String, first: Int, sort: [PostLikesConnectionSort!], where: PostLikesConnectionWhere): PostLikesConnection! title: String } @@ -286,10 +290,10 @@ type PostsConnection { } type Query { - posts(options: PostOptions, where: PostWhere): [Post!]! - postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! + posts(limit: Int, offset: Int, sort: [PostSort!], where: PostWhere): [Post!]! + postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! + users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! + usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } type User { @@ -359,59 +363,69 @@ input LikesWhere { AND: [LikesWhere!] NOT: LikesWhere OR: [LikesWhere!] - someBigInt: BigInt + someBigInt: BigInt @deprecated(reason : "Please use the explicit _EQ version") + someBigInt_EQ: BigInt someBigInt_GT: BigInt someBigInt_GTE: BigInt someBigInt_IN: [BigInt] someBigInt_LT: BigInt someBigInt_LTE: BigInt - someDateTime: DateTime + someDateTime: DateTime @deprecated(reason : "Please use the explicit _EQ version") + someDateTime_EQ: DateTime someDateTime_GT: DateTime someDateTime_GTE: DateTime someDateTime_IN: [DateTime] someDateTime_LT: DateTime someDateTime_LTE: DateTime - someDuration: Duration + someDuration: Duration @deprecated(reason : "Please use the explicit _EQ version") + someDuration_EQ: Duration someDuration_GT: Duration someDuration_GTE: Duration someDuration_IN: [Duration] someDuration_LT: Duration someDuration_LTE: Duration - someFloat: Float + someFloat: Float @deprecated(reason : "Please use the explicit _EQ version") + someFloat_EQ: Float someFloat_GT: Float someFloat_GTE: Float someFloat_IN: [Float] someFloat_LT: Float someFloat_LTE: Float - someId: ID + someId: ID @deprecated(reason : "Please use the explicit _EQ version") someId_CONTAINS: ID someId_ENDS_WITH: ID + someId_EQ: ID someId_IN: [ID] someId_STARTS_WITH: ID - someInt: Int + someInt: Int @deprecated(reason : "Please use the explicit _EQ version") + someInt_EQ: Int someInt_GT: Int someInt_GTE: Int someInt_IN: [Int] someInt_LT: Int someInt_LTE: Int - someLocalDateTime: LocalDateTime + someLocalDateTime: LocalDateTime @deprecated(reason : "Please use the explicit _EQ version") + someLocalDateTime_EQ: LocalDateTime someLocalDateTime_GT: LocalDateTime someLocalDateTime_GTE: LocalDateTime someLocalDateTime_IN: [LocalDateTime] someLocalDateTime_LT: LocalDateTime someLocalDateTime_LTE: LocalDateTime - someLocalTime: LocalTime + someLocalTime: LocalTime @deprecated(reason : "Please use the explicit _EQ version") + someLocalTime_EQ: LocalTime someLocalTime_GT: LocalTime someLocalTime_GTE: LocalTime someLocalTime_IN: [LocalTime] someLocalTime_LT: LocalTime someLocalTime_LTE: LocalTime - someString: String + someString: String @deprecated(reason : "Please use the explicit _EQ version") someString_CONTAINS: String someString_ENDS_WITH: String + someString_EQ: String someString_IN: [String] someString_STARTS_WITH: String - someTime: Time + someTime: Time @deprecated(reason : "Please use the explicit _EQ version") + someTime_EQ: Time someTime_GT: Time someTime_GTE: Time someTime_IN: [Time] @@ -432,13 +446,6 @@ input PostLikesConnectionWhere { node: UserWhere } -input PostOptions { - limit: Int - offset: Int - "Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PostSort!] -} - "Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object." input PostSort { title: SortDirection @@ -464,20 +471,14 @@ input PostWhere { likes_SINGLE: UserWhere "Return Posts where some of the related Users match this filter" likes_SOME: UserWhere - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } -input UserOptions { - limit: Int - offset: Int - "Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array." - sort: [UserSort!] -} - "Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object." input UserSort { someBigInt: SortDirection @@ -496,59 +497,69 @@ input UserWhere { AND: [UserWhere!] NOT: UserWhere OR: [UserWhere!] - someBigInt: BigInt + someBigInt: BigInt @deprecated(reason : "Please use the explicit _EQ version") + someBigInt_EQ: BigInt someBigInt_GT: BigInt someBigInt_GTE: BigInt someBigInt_IN: [BigInt] someBigInt_LT: BigInt someBigInt_LTE: BigInt - someDateTime: DateTime + someDateTime: DateTime @deprecated(reason : "Please use the explicit _EQ version") + someDateTime_EQ: DateTime someDateTime_GT: DateTime someDateTime_GTE: DateTime someDateTime_IN: [DateTime] someDateTime_LT: DateTime someDateTime_LTE: DateTime - someDuration: Duration + someDuration: Duration @deprecated(reason : "Please use the explicit _EQ version") + someDuration_EQ: Duration someDuration_GT: Duration someDuration_GTE: Duration someDuration_IN: [Duration] someDuration_LT: Duration someDuration_LTE: Duration - someFloat: Float + someFloat: Float @deprecated(reason : "Please use the explicit _EQ version") + someFloat_EQ: Float someFloat_GT: Float someFloat_GTE: Float someFloat_IN: [Float] someFloat_LT: Float someFloat_LTE: Float - someId: ID + someId: ID @deprecated(reason : "Please use the explicit _EQ version") someId_CONTAINS: ID someId_ENDS_WITH: ID + someId_EQ: ID someId_IN: [ID] someId_STARTS_WITH: ID - someInt: Int + someInt: Int @deprecated(reason : "Please use the explicit _EQ version") + someInt_EQ: Int someInt_GT: Int someInt_GTE: Int someInt_IN: [Int] someInt_LT: Int someInt_LTE: Int - someLocalDateTime: LocalDateTime + someLocalDateTime: LocalDateTime @deprecated(reason : "Please use the explicit _EQ version") + someLocalDateTime_EQ: LocalDateTime someLocalDateTime_GT: LocalDateTime someLocalDateTime_GTE: LocalDateTime someLocalDateTime_IN: [LocalDateTime] someLocalDateTime_LT: LocalDateTime someLocalDateTime_LTE: LocalDateTime - someLocalTime: LocalTime + someLocalTime: LocalTime @deprecated(reason : "Please use the explicit _EQ version") + someLocalTime_EQ: LocalTime someLocalTime_GT: LocalTime someLocalTime_GTE: LocalTime someLocalTime_IN: [LocalTime] someLocalTime_LT: LocalTime someLocalTime_LTE: LocalTime - someString: String + someString: String @deprecated(reason : "Please use the explicit _EQ version") someString_CONTAINS: String someString_ENDS_WITH: String + someString_EQ: String someString_IN: [String] someString_STARTS_WITH: String - someTime: Time + someTime: Time @deprecated(reason : "Please use the explicit _EQ version") + someTime_EQ: Time someTime_GT: Time someTime_GTE: Time someTime_IN: [Time] diff --git a/core/src/test/resources/tck-test-files/schema/v2/aggregations.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/aggregations.js.adoc index c9a10e1b..977e3241 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/aggregations.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/aggregations.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID isbn: String! title: String @@ -69,15 +69,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -99,67 +90,78 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - createdAt: DateTime + createdAt: DateTime @deprecated(reason: "Please use the explicit _EQ version") + createdAt_EQ: DateTime createdAt_GT: DateTime createdAt_GTE: DateTime createdAt_IN: [DateTime] createdAt_LT: DateTime createdAt_LTE: DateTime - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - imdbRating: Float + imdbRating: Float @deprecated(reason: "Please use the explicit _EQ version") + imdbRating_EQ: Float imdbRating_GT: Float imdbRating_GTE: Float imdbRating_IN: [Float] imdbRating_LT: Float imdbRating_LTE: Float - isbn: String + isbn: String @deprecated(reason: "Please use the explicit _EQ version") isbn_CONTAINS: String isbn_ENDS_WITH: String + isbn_EQ: String isbn_IN: [String!] isbn_STARTS_WITH: String - screenTime: Duration + screenTime: Duration @deprecated(reason: "Please use the explicit _EQ version") + screenTime_EQ: Duration screenTime_GT: Duration screenTime_GTE: Duration screenTime_IN: [Duration] screenTime_LT: Duration screenTime_LTE: Duration - someBigInt: BigInt + someBigInt: BigInt @deprecated(reason: "Please use the explicit _EQ version") + someBigInt_EQ: BigInt someBigInt_GT: BigInt someBigInt_GTE: BigInt someBigInt_IN: [BigInt] someBigInt_LT: BigInt someBigInt_LTE: BigInt - someInt: Int + someInt: Int @deprecated(reason: "Please use the explicit _EQ version") + someInt_EQ: Int someInt_GT: Int someInt_GTE: Int someInt_IN: [Int] someInt_LT: Int someInt_LTE: Int - someLocalDateTime: LocalDateTime + someLocalDateTime: LocalDateTime @deprecated(reason: "Please use the explicit _EQ version") + someLocalDateTime_EQ: LocalDateTime someLocalDateTime_GT: LocalDateTime someLocalDateTime_GTE: LocalDateTime someLocalDateTime_IN: [LocalDateTime] someLocalDateTime_LT: LocalDateTime someLocalDateTime_LTE: LocalDateTime - someLocalTime: LocalTime + someLocalTime: LocalTime @deprecated(reason: "Please use the explicit _EQ version") + someLocalTime_EQ: LocalTime someLocalTime_GT: LocalTime someLocalTime_GTE: LocalTime someLocalTime_IN: [LocalTime] someLocalTime_LT: LocalTime someLocalTime_LTE: LocalTime - someTime: Time + someTime: Time @deprecated(reason: "Please use the explicit _EQ version") + someTime_EQ: Time someTime_GT: Time someTime_GTE: Time someTime_IN: [Time] someTime_LT: Time someTime_LTE: Time - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } @@ -179,8 +181,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" @@ -200,7 +202,7 @@ scalar Time .Schema [source,graphql,schema=true] ---- -type User { +type User @node { someId: ID someString: String someFloat: Float @@ -213,7 +215,7 @@ type User { someDuration: Duration } -type Post { +type Post @node { title: String likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } @@ -284,59 +286,69 @@ input LikesWhere { AND: [LikesWhere!] NOT: LikesWhere OR: [LikesWhere!] - someBigInt: BigInt + someBigInt: BigInt @deprecated(reason: "Please use the explicit _EQ version") + someBigInt_EQ: BigInt someBigInt_GT: BigInt someBigInt_GTE: BigInt someBigInt_IN: [BigInt] someBigInt_LT: BigInt someBigInt_LTE: BigInt - someDateTime: DateTime + someDateTime: DateTime @deprecated(reason: "Please use the explicit _EQ version") + someDateTime_EQ: DateTime someDateTime_GT: DateTime someDateTime_GTE: DateTime someDateTime_IN: [DateTime] someDateTime_LT: DateTime someDateTime_LTE: DateTime - someDuration: Duration + someDuration: Duration @deprecated(reason: "Please use the explicit _EQ version") + someDuration_EQ: Duration someDuration_GT: Duration someDuration_GTE: Duration someDuration_IN: [Duration] someDuration_LT: Duration someDuration_LTE: Duration - someFloat: Float + someFloat: Float @deprecated(reason: "Please use the explicit _EQ version") + someFloat_EQ: Float someFloat_GT: Float someFloat_GTE: Float someFloat_IN: [Float] someFloat_LT: Float someFloat_LTE: Float - someId: ID + someId: ID @deprecated(reason: "Please use the explicit _EQ version") someId_CONTAINS: ID someId_ENDS_WITH: ID + someId_EQ: ID someId_IN: [ID] someId_STARTS_WITH: ID - someInt: Int + someInt: Int @deprecated(reason: "Please use the explicit _EQ version") + someInt_EQ: Int someInt_GT: Int someInt_GTE: Int someInt_IN: [Int] someInt_LT: Int someInt_LTE: Int - someLocalDateTime: LocalDateTime + someLocalDateTime: LocalDateTime @deprecated(reason: "Please use the explicit _EQ version") + someLocalDateTime_EQ: LocalDateTime someLocalDateTime_GT: LocalDateTime someLocalDateTime_GTE: LocalDateTime someLocalDateTime_IN: [LocalDateTime] someLocalDateTime_LT: LocalDateTime someLocalDateTime_LTE: LocalDateTime - someLocalTime: LocalTime + someLocalTime: LocalTime @deprecated(reason: "Please use the explicit _EQ version") + someLocalTime_EQ: LocalTime someLocalTime_GT: LocalTime someLocalTime_GTE: LocalTime someLocalTime_IN: [LocalTime] someLocalTime_LT: LocalTime someLocalTime_LTE: LocalTime - someString: String + someString: String @deprecated(reason: "Please use the explicit _EQ version") someString_CONTAINS: String someString_ENDS_WITH: String + someString_EQ: String someString_IN: [String] someString_STARTS_WITH: String - someTime: Time + someTime: Time @deprecated(reason: "Please use the explicit _EQ version") + someTime_EQ: Time someTime_GT: Time someTime_GTE: Time someTime_IN: [Time] @@ -361,8 +373,8 @@ type PageInfo { } type Post { - likes(directed: Boolean = true, options: UserOptions, where: UserWhere): [User!]! - likesConnection(after: String, directed: Boolean = true, first: Int, sort: [PostLikesConnectionSort!], where: PostLikesConnectionWhere): PostLikesConnection! + likes(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! + likesConnection(after: String, first: Int, sort: [PostLikesConnectionSort!], where: PostLikesConnectionWhere): PostLikesConnection! title: String } @@ -396,15 +408,6 @@ type PostLikesRelationship { properties: Likes! } -input PostOptions { - limit: Int - offset: Int - """ - Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PostSort!] -} - """ Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. """ @@ -440,9 +443,10 @@ input PostWhere { likes_SINGLE: UserWhere """Return Posts where some of the related Users match this filter""" likes_SOME: UserWhere - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } @@ -454,10 +458,10 @@ type PostsConnection { } type Query { - posts(options: PostOptions, where: PostWhere): [Post!]! - postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! + posts(limit: Int, offset: Int, sort: [PostSort!], where: PostWhere): [Post!]! + postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! + users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! + usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } """An enum for sorting in either ascending or descending order.""" @@ -489,15 +493,6 @@ type UserEdge { node: User! } -input UserOptions { - limit: Int - offset: Int - """ - Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [UserSort!] -} - """ Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. """ @@ -518,59 +513,69 @@ input UserWhere { AND: [UserWhere!] NOT: UserWhere OR: [UserWhere!] - someBigInt: BigInt + someBigInt: BigInt @deprecated(reason: "Please use the explicit _EQ version") + someBigInt_EQ: BigInt someBigInt_GT: BigInt someBigInt_GTE: BigInt someBigInt_IN: [BigInt] someBigInt_LT: BigInt someBigInt_LTE: BigInt - someDateTime: DateTime + someDateTime: DateTime @deprecated(reason: "Please use the explicit _EQ version") + someDateTime_EQ: DateTime someDateTime_GT: DateTime someDateTime_GTE: DateTime someDateTime_IN: [DateTime] someDateTime_LT: DateTime someDateTime_LTE: DateTime - someDuration: Duration + someDuration: Duration @deprecated(reason: "Please use the explicit _EQ version") + someDuration_EQ: Duration someDuration_GT: Duration someDuration_GTE: Duration someDuration_IN: [Duration] someDuration_LT: Duration someDuration_LTE: Duration - someFloat: Float + someFloat: Float @deprecated(reason: "Please use the explicit _EQ version") + someFloat_EQ: Float someFloat_GT: Float someFloat_GTE: Float someFloat_IN: [Float] someFloat_LT: Float someFloat_LTE: Float - someId: ID + someId: ID @deprecated(reason: "Please use the explicit _EQ version") someId_CONTAINS: ID someId_ENDS_WITH: ID + someId_EQ: ID someId_IN: [ID] someId_STARTS_WITH: ID - someInt: Int + someInt: Int @deprecated(reason: "Please use the explicit _EQ version") + someInt_EQ: Int someInt_GT: Int someInt_GTE: Int someInt_IN: [Int] someInt_LT: Int someInt_LTE: Int - someLocalDateTime: LocalDateTime + someLocalDateTime: LocalDateTime @deprecated(reason: "Please use the explicit _EQ version") + someLocalDateTime_EQ: LocalDateTime someLocalDateTime_GT: LocalDateTime someLocalDateTime_GTE: LocalDateTime someLocalDateTime_IN: [LocalDateTime] someLocalDateTime_LT: LocalDateTime someLocalDateTime_LTE: LocalDateTime - someLocalTime: LocalTime + someLocalTime: LocalTime @deprecated(reason: "Please use the explicit _EQ version") + someLocalTime_EQ: LocalTime someLocalTime_GT: LocalTime someLocalTime_GTE: LocalTime someLocalTime_IN: [LocalTime] someLocalTime_LT: LocalTime someLocalTime_LTE: LocalTime - someString: String + someString: String @deprecated(reason: "Please use the explicit _EQ version") someString_CONTAINS: String someString_ENDS_WITH: String + someString_EQ: String someString_IN: [String] someString_STARTS_WITH: String - someTime: Time + someTime: Time @deprecated(reason: "Please use the explicit _EQ version") + someTime_EQ: Time someTime_GT: Time someTime_GTE: Time someTime_IN: [Time] diff --git a/core/src/test/resources/tck-test-files/schema/v2/array-methods.adoc b/core/src/test/resources/tck-test-files/schema/v2/array-methods.adoc index 7021e621..99f06b68 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/array-methods.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/array-methods.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String actedIn: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } -type Movie { +type Movie @node { id: ID! ratings: [Float!]! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) @@ -42,8 +42,8 @@ type ActedIn { } type Actor { - actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String } @@ -71,8 +71,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! averageRating: Float! id: ID! ratings: [Float!]! @@ -110,10 +110,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -132,7 +132,8 @@ input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - pay: [Float] + pay: [Float] @deprecated(reason : "Please use the explicit _EQ version") + pay_EQ: [Float] pay_INCLUDES: Float } @@ -149,13 +150,6 @@ input ActorActedInConnectionWhere { node: MovieWhere } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { name: SortDirection @@ -181,9 +175,10 @@ input ActorWhere { actedIn_SINGLE: MovieWhere "Return Actors where some of the related Movies match this filter" actedIn_SOME: MovieWhere - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -201,13 +196,6 @@ input MovieActorsConnectionWhere { node: ActorWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { averageRating: SortDirection @@ -234,18 +222,21 @@ input MovieWhere { actors_SINGLE: ActorWhere "Return Movies where some of the related Actors match this filter" actors_SOME: ActorWhere - averageRating: Float + averageRating: Float @deprecated(reason : "Please use the explicit _EQ version") + averageRating_EQ: Float averageRating_GT: Float averageRating_GTE: Float averageRating_IN: [Float!] averageRating_LT: Float averageRating_LTE: Float - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID!] id_STARTS_WITH: ID - ratings: [Float!] + ratings: [Float!] @deprecated(reason : "Please use the explicit _EQ version") + ratings_EQ: [Float!] ratings_INCLUDES: Float } diff --git a/core/src/test/resources/tck-test-files/schema/v2/array-methods.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/array-methods.js.adoc index 0073560d..30f1c164 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/array-methods.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/array-methods.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String actedIn: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } -type Movie { +type Movie @node { id: ID! ratings: [Float!]! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) @@ -50,13 +50,14 @@ input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - pay: [Float] + pay: [Float] @deprecated(reason: "Please use the explicit _EQ version") + pay_EQ: [Float] pay_INCLUDES: Float } type Actor { - actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String } @@ -90,15 +91,6 @@ type ActorEdge { node: Actor! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -134,9 +126,10 @@ input ActorWhere { actedIn_SINGLE: MovieWhere """Return Actors where some of the related Movies match this filter""" actedIn_SOME: MovieWhere - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -148,8 +141,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! averageRating: Float! id: ID! ratings: [Float!]! @@ -185,15 +178,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -230,18 +214,21 @@ input MovieWhere { actors_SINGLE: ActorWhere """Return Movies where some of the related Actors match this filter""" actors_SOME: ActorWhere - averageRating: Float + averageRating: Float @deprecated(reason: "Please use the explicit _EQ version") + averageRating_EQ: Float averageRating_GT: Float averageRating_GTE: Float averageRating_IN: [Float!] averageRating_LT: Float averageRating_LTE: Float - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID!] id_STARTS_WITH: ID - ratings: [Float!] + ratings: [Float!] @deprecated(reason: "Please use the explicit _EQ version") + ratings_EQ: [Float!] ratings_INCLUDES: Float } @@ -260,10 +247,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/arrays.adoc b/core/src/test/resources/tck-test-files/schema/v2/arrays.adoc index c058e029..49ac9576 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/arrays.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/arrays.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID! ratings: [Float!]! averageRating: Float! @@ -48,8 +48,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -60,13 +60,6 @@ enum SortDirection { DESC } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { averageRating: SortDirection @@ -77,18 +70,21 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - averageRating: Float + averageRating: Float @deprecated(reason : "Please use the explicit _EQ version") + averageRating_EQ: Float averageRating_GT: Float averageRating_GTE: Float averageRating_IN: [Float!] averageRating_LT: Float averageRating_LTE: Float - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID!] id_STARTS_WITH: ID - ratings: [Float!] + ratings: [Float!] @deprecated(reason : "Please use the explicit _EQ version") + ratings_EQ: [Float!] ratings_INCLUDES: Float } diff --git a/core/src/test/resources/tck-test-files/schema/v2/arrays.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/arrays.js.adoc index 32e8c06b..defbe3ee 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/arrays.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/arrays.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID! ratings: [Float!]! averageRating: Float! @@ -34,15 +34,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -55,18 +46,21 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - averageRating: Float + averageRating: Float @deprecated(reason: "Please use the explicit _EQ version") + averageRating_EQ: Float averageRating_GT: Float averageRating_GTE: Float averageRating_IN: [Float!] averageRating_LT: Float averageRating_LTE: Float - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID!] id_STARTS_WITH: ID - ratings: [Float!] + ratings: [Float!] @deprecated(reason: "Please use the explicit _EQ version") + ratings_EQ: [Float!] ratings_INCLUDES: Float } @@ -85,8 +79,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/comments.adoc b/core/src/test/resources/tck-test-files/schema/v2/comments.adoc index bd8001ee..c0fb863c 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/comments.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/comments.adoc @@ -19,7 +19,7 @@ enum Genre { } """A type describing a movie.""" -type Movie { +type Movie @node { id: ID "The number of actors who acted in the movie." actorCount: Int @@ -27,7 +27,7 @@ type Movie { averageRating: Float """ Is the movie active? - + This is measured based on annual profit. """ isActive: Boolean @@ -80,8 +80,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enumeration of movie genres." @@ -102,13 +102,6 @@ enum SortDirection { "A custom scalar." scalar CustomScalar -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { actorCount: SortDirection @@ -123,28 +116,34 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - actorCount: Int + actorCount: Int @deprecated(reason : "Please use the explicit _EQ version") + actorCount_EQ: Int actorCount_GT: Int actorCount_GTE: Int actorCount_IN: [Int] actorCount_LT: Int actorCount_LTE: Int - averageRating: Float + averageRating: Float @deprecated(reason : "Please use the explicit _EQ version") + averageRating_EQ: Float averageRating_GT: Float averageRating_GTE: Float averageRating_IN: [Float] averageRating_LT: Float averageRating_LTE: Float - customScalar: CustomScalar + customScalar: CustomScalar @deprecated(reason : "Please use the explicit _EQ version") + customScalar_EQ: CustomScalar customScalar_IN: [CustomScalar] - genre: Genre + genre: Genre @deprecated(reason : "Please use the explicit _EQ version") + genre_EQ: Genre genre_IN: [Genre] - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - isActive: Boolean + isActive: Boolean @deprecated(reason : "Please use the explicit _EQ version") + isActive_EQ: Boolean } ---- @@ -156,11 +155,11 @@ input MovieWhere { .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String } -type Movie { +type Movie @node { id: ID "Actors in Movie" actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) @@ -191,8 +190,8 @@ type ActorsConnection { type Movie { "Actors in Movie" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -227,10 +226,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -241,13 +240,6 @@ enum SortDirection { DESC } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { name: SortDirection @@ -257,9 +249,10 @@ input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -275,13 +268,6 @@ input MovieActorsConnectionWhere { node: ActorWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -307,9 +293,10 @@ input MovieWhere { actors_SINGLE: ActorWhere "Return Movies where some of the related Actors match this filter" actors_SOME: ActorWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -325,12 +312,12 @@ interface Production { title: String! } -type Movie implements Production { +type Movie implements Production @node { title: String! runtime: Int! } -type Series implements Production { +type Series implements Production @node { title: String! episodes: Int! } @@ -339,7 +326,7 @@ type ActedIn @relationshipProperties { screenTime: Int! } -type Actor { +type Actor @node { name: String! "Acted in Production" actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") @@ -367,8 +354,8 @@ type ActedIn { type Actor { "Acted in Production" - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -431,14 +418,14 @@ type ProductionsConnection { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! + productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! + series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! + seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } type Series implements Production { @@ -478,7 +465,8 @@ input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - screenTime: Int + screenTime: Int @deprecated(reason : "Please use the explicit _EQ version") + screenTime_EQ: Int screenTime_GT: Int screenTime_GTE: Int screenTime_IN: [Int!] @@ -499,13 +487,6 @@ input ActorActedInConnectionWhere { node: ProductionWhere } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { name: SortDirection @@ -531,20 +512,14 @@ input ActorWhere { actedIn_SINGLE: ProductionWhere "Return Actors where some of the related Productions match this filter" actedIn_SOME: ProductionWhere - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { runtime: SortDirection @@ -555,26 +530,21 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - runtime: Int + runtime: Int @deprecated(reason : "Please use the explicit _EQ version") + runtime_EQ: Int runtime_GT: Int runtime_GTE: Int runtime_IN: [Int!] runtime_LT: Int runtime_LTE: Int - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } -input ProductionOptions { - limit: Int - offset: Int - "Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ProductionSort] -} - "Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object." input ProductionSort { title: SortDirection @@ -584,19 +554,13 @@ input ProductionWhere { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] -} - -input SeriesOptions { - limit: Int - offset: Int - "Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array." - sort: [SeriesSort!] + typename: [ProductionImplementation!] } "Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object." @@ -609,15 +573,17 @@ input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] - episodes: Int + episodes: Int @deprecated(reason : "Please use the explicit _EQ version") + episodes_EQ: Int episodes_GT: Int episodes_GTE: Int episodes_IN: [Int!] episodes_LT: Int episodes_LTE: Int - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } @@ -631,11 +597,11 @@ input SeriesWhere { ---- union Search = Movie | Genre -type Genre { +type Genre @node { id: ID } -type Movie { +type Movie @node { id: ID search: [Search!]! @relationship(type: "SEARCH", direction: OUT) searchNoDirective: Search @@ -668,8 +634,8 @@ type GenresConnection { type Movie { id: ID - search(directed: Boolean = true, options: QueryOptions, where: SearchWhere): [Search!]! - searchConnection(after: String, directed: Boolean = true, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! + search(limit: Int, offset: Int, where: SearchWhere): [Search!]! + searchConnection(after: String, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! searchNoDirective: Search } @@ -704,11 +670,11 @@ type PageInfo { } type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - searches(options: QueryOptions, where: SearchWhere): [Search!]! + genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! + genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + searches(limit: Int, offset: Int, where: SearchWhere): [Search!]! } "An enum for sorting in either ascending or descending order." @@ -719,13 +685,6 @@ enum SortDirection { DESC } -input GenreOptions { - limit: Int - offset: Int - "Specify one or more GenreSort objects to sort Genres by. The sorts will be applied in the order in which they are arranged in the array." - sort: [GenreSort!] -} - "Fields to sort Genres by. The order in which sorts are applied is not guaranteed when specifying many fields in one GenreSort object." input GenreSort { id: SortDirection @@ -735,20 +694,14 @@ input GenreWhere { AND: [GenreWhere!] NOT: GenreWhere OR: [GenreWhere!] - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - input MovieSearchConnectionWhere { Genre: MovieSearchGenreConnectionWhere Movie: MovieSearchMovieConnectionWhere @@ -777,9 +730,10 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID "Return Movies where all of the related MovieSearchConnections match this filter" @@ -800,12 +754,6 @@ input MovieWhere { search_SOME: SearchWhere } -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - input SearchWhere { Genre: GenreWhere Movie: MovieWhere diff --git a/core/src/test/resources/tck-test-files/schema/v2/comments.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/comments.js.adoc index 7b088b12..1f970881 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/comments.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/comments.js.adoc @@ -20,7 +20,7 @@ enum Genre { } """A type describing a movie.""" -type Movie { +type Movie @node { id: ID "The number of actors who acted in the movie." actorCount: Int @@ -76,15 +76,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -101,28 +92,34 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - actorCount: Int + actorCount: Int @deprecated(reason: "Please use the explicit _EQ version") + actorCount_EQ: Int actorCount_GT: Int actorCount_GTE: Int actorCount_IN: [Int] actorCount_LT: Int actorCount_LTE: Int - averageRating: Float + averageRating: Float @deprecated(reason: "Please use the explicit _EQ version") + averageRating_EQ: Float averageRating_GT: Float averageRating_GTE: Float averageRating_IN: [Float] averageRating_LT: Float averageRating_LTE: Float - customScalar: CustomScalar + customScalar: CustomScalar @deprecated(reason: "Please use the explicit _EQ version") + customScalar_EQ: CustomScalar customScalar_IN: [CustomScalar] - genre: Genre + genre: Genre @deprecated(reason: "Please use the explicit _EQ version") + genre_EQ: Genre genre_IN: [Genre] - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - isActive: Boolean + isActive: Boolean @deprecated(reason: "Please use the explicit _EQ version") + isActive_EQ: Boolean } type MoviesConnection { @@ -140,8 +137,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" @@ -160,11 +157,11 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String } -type Movie { +type Movie @node { id: ID "Actors in Movie" actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) @@ -187,15 +184,6 @@ type ActorEdge { node: Actor! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -207,9 +195,10 @@ input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -222,8 +211,8 @@ type ActorsConnection { type Movie { """Actors in Movie""" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -254,15 +243,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -298,9 +278,10 @@ input MovieWhere { actors_SINGLE: ActorWhere """Return Movies where some of the related Actors match this filter""" actors_SOME: ActorWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -320,10 +301,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" @@ -344,12 +325,12 @@ interface Production { title: String! } -type Movie implements Production { +type Movie implements Production @node { title: String! runtime: Int! } -type Series implements Production { +type Series implements Production @node { title: String! episodes: Int! } @@ -358,7 +339,7 @@ type ActedIn @relationshipProperties { screenTime: Int! } -type Actor { +type Actor @node { name: String! "Acted in Production" actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") @@ -388,7 +369,8 @@ input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - screenTime: Int + screenTime: Int @deprecated(reason: "Please use the explicit _EQ version") + screenTime_EQ: Int screenTime_GT: Int screenTime_GTE: Int screenTime_IN: [Int!] @@ -398,8 +380,8 @@ input ActedInWhere { type Actor { """Acted in Production""" - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -433,15 +415,6 @@ type ActorEdge { node: Actor! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -477,9 +450,10 @@ input ActorWhere { actedIn_SINGLE: ProductionWhere """Return Actors where some of the related Productions match this filter""" actedIn_SOME: ProductionWhere - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } @@ -500,15 +474,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -521,15 +486,17 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - runtime: Int + runtime: Int @deprecated(reason: "Please use the explicit _EQ version") + runtime_EQ: Int runtime_GT: Int runtime_GTE: Int runtime_IN: [Int!] runtime_LT: Int runtime_LTE: Int - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } @@ -562,15 +529,6 @@ enum ProductionImplementation { Series } -input ProductionOptions { - limit: Int - offset: Int - """ - Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ProductionSort] -} - """ Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. """ @@ -582,12 +540,13 @@ input ProductionWhere { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] } type ProductionsConnection { @@ -597,14 +556,14 @@ type ProductionsConnection { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! + productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! + series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! + seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } type Series implements Production { @@ -623,15 +582,6 @@ type SeriesEdge { node: Series! } -input SeriesOptions { - limit: Int - offset: Int - """ - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [SeriesSort!] -} - """ Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. """ @@ -644,15 +594,17 @@ input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] - episodes: Int + episodes: Int @deprecated(reason: "Please use the explicit _EQ version") + episodes_EQ: Int episodes_GT: Int episodes_GTE: Int episodes_IN: [Int!] episodes_LT: Int episodes_LTE: Int - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } @@ -673,11 +625,11 @@ enum SortDirection { ---- union Search = Movie | Genre -type Genre { +type Genre @node { id: ID } -type Movie { +type Movie @node { id: ID search: [Search!]! @relationship(type: "SEARCH", direction: OUT) searchNoDirective: Search @@ -700,15 +652,6 @@ type GenreEdge { node: Genre! } -input GenreOptions { - limit: Int - offset: Int - """ - Specify one or more GenreSort objects to sort Genres by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [GenreSort!] -} - """ Fields to sort Genres by. The order in which sorts are applied is not guaranteed when specifying many fields in one GenreSort object. """ @@ -720,9 +663,10 @@ input GenreWhere { AND: [GenreWhere!] NOT: GenreWhere OR: [GenreWhere!] - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -735,8 +679,8 @@ type GenresConnection { type Movie { id: ID - search(directed: Boolean = true, options: QueryOptions, where: SearchWhere): [Search!]! - searchConnection(after: String, directed: Boolean = true, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! + search(limit: Int, offset: Int, where: SearchWhere): [Search!]! + searchConnection(after: String, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! searchNoDirective: Search } @@ -745,15 +689,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - type MovieSearchConnection { edges: [MovieSearchRelationship!]! pageInfo: PageInfo! @@ -795,9 +730,10 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID """ @@ -841,17 +777,11 @@ type PageInfo { } type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - searches(options: QueryOptions, where: SearchWhere): [Search!]! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int + genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! + genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + searches(limit: Int, offset: Int, where: SearchWhere): [Search!]! } union Search = Genre | Movie diff --git a/core/src/test/resources/tck-test-files/schema/v2/connections/enums.adoc b/core/src/test/resources/tck-test-files/schema/v2/connections/enums.adoc index 91162098..87846af7 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/connections/enums.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/connections/enums.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") } @@ -45,8 +45,8 @@ type ActedIn { } type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! name: String! } @@ -74,8 +74,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String! } @@ -111,10 +111,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } enum RoleType { @@ -138,7 +138,8 @@ input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - roleType: RoleType + roleType: RoleType @deprecated(reason : "Please use the explicit _EQ version") + roleType_EQ: RoleType roleType_IN: [RoleType!] } @@ -155,13 +156,6 @@ input ActorMoviesConnectionWhere { node: MovieWhere } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { name: SortDirection @@ -187,9 +181,10 @@ input ActorWhere { movies_SINGLE: MovieWhere "Return Actors where some of the related Movies match this filter" movies_SOME: MovieWhere - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } @@ -207,13 +202,6 @@ input MovieActorsConnectionWhere { node: ActorWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { title: SortDirection @@ -239,9 +227,10 @@ input MovieWhere { actors_SINGLE: ActorWhere "Return Movies where some of the related Actors match this filter" actors_SOME: ActorWhere - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } diff --git a/core/src/test/resources/tck-test-files/schema/v2/connections/enums.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/connections/enums.js.adoc index 76581161..00ad2a2c 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/connections/enums.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/connections/enums.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") } @@ -53,13 +53,14 @@ input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - roleType: RoleType + roleType: RoleType @deprecated(reason: "Please use the explicit _EQ version") + roleType_EQ: RoleType roleType_IN: [RoleType!] } type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! name: String! } @@ -93,15 +94,6 @@ type ActorMoviesRelationship { properties: ActedIn! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -137,9 +129,10 @@ input ActorWhere { movies_SINGLE: MovieWhere """Return Actors where some of the related Movies match this filter""" movies_SOME: MovieWhere - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } @@ -151,8 +144,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String! } @@ -186,15 +179,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -230,9 +214,10 @@ input MovieWhere { actors_SINGLE: ActorWhere """Return Movies where some of the related Actors match this filter""" actors_SOME: ActorWhere - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } @@ -252,10 +237,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } enum RoleType { diff --git a/core/src/test/resources/tck-test-files/schema/v2/connections/sort.adoc b/core/src/test/resources/tck-test-files/schema/v2/connections/sort.adoc index 5997162f..740444ec 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/connections/sort.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/connections/sort.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Node1 { +type Node1 @node { property: String! relatedTo: [Node2!]! @relationship(type: "RELATED_TO", direction: OUT) } -type Node2 { +type Node2 @node { relatedTo: [Node1!]! @relationship(type: "RELATED_TO", direction: OUT) } ---- @@ -27,8 +27,8 @@ schema { type Node1 { property: String! - relatedTo(directed: Boolean = true, options: Node2Options, where: Node2Where): [Node2!]! - relatedToConnection(after: String, directed: Boolean = true, first: Int, where: Node1RelatedToConnectionWhere): Node1RelatedToConnection! + relatedTo(limit: Int, offset: Int, where: Node2Where): [Node2!]! + relatedToConnection(after: String, first: Int, where: Node1RelatedToConnectionWhere): Node1RelatedToConnection! } type Node1Edge { @@ -54,8 +54,8 @@ type Node1sConnection { } type Node2 { - relatedTo(directed: Boolean = true, options: Node1Options, where: Node1Where): [Node1!]! - relatedToConnection(after: String, directed: Boolean = true, first: Int, sort: [Node2RelatedToConnectionSort!], where: Node2RelatedToConnectionWhere): Node2RelatedToConnection! + relatedTo(limit: Int, offset: Int, sort: [Node1Sort!], where: Node1Where): [Node1!]! + relatedToConnection(after: String, first: Int, sort: [Node2RelatedToConnectionSort!], where: Node2RelatedToConnectionWhere): Node2RelatedToConnection! } type Node2Edge { @@ -89,9 +89,9 @@ type PageInfo { } type Query { - node1s(options: Node1Options, where: Node1Where): [Node1!]! - node1sConnection(after: String, first: Int, sort: [Node1Sort], where: Node1Where): Node1sConnection! - node2s(options: Node2Options, where: Node2Where): [Node2!]! + node1s(limit: Int, offset: Int, sort: [Node1Sort!], where: Node1Where): [Node1!]! + node1sConnection(after: String, first: Int, sort: [Node1Sort!], where: Node1Where): Node1sConnection! + node2s(limit: Int, offset: Int, where: Node2Where): [Node2!]! node2sConnection(after: String, first: Int, where: Node2Where): Node2sConnection! } @@ -103,13 +103,6 @@ enum SortDirection { DESC } -input Node1Options { - limit: Int - offset: Int - "Specify one or more Node1Sort objects to sort Node1s by. The sorts will be applied in the order in which they are arranged in the array." - sort: [Node1Sort!] -} - input Node1RelatedToConnectionWhere { AND: [Node1RelatedToConnectionWhere!] NOT: Node1RelatedToConnectionWhere @@ -126,9 +119,10 @@ input Node1Where { AND: [Node1Where!] NOT: Node1Where OR: [Node1Where!] - property: String + property: String @deprecated(reason : "Please use the explicit _EQ version") property_CONTAINS: String property_ENDS_WITH: String + property_EQ: String property_IN: [String!] property_STARTS_WITH: String "Return Node1s where all of the related Node1RelatedToConnections match this filter" @@ -149,11 +143,6 @@ input Node1Where { relatedTo_SOME: Node2Where } -input Node2Options { - limit: Int - offset: Int -} - input Node2RelatedToConnectionSort { node: Node1Sort } diff --git a/core/src/test/resources/tck-test-files/schema/v2/connections/sort.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/connections/sort.js.adoc index e4ba1234..0a5a03ce 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/connections/sort.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/connections/sort.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Node1 { +type Node1 @node { property: String! relatedTo: [Node2!]! @relationship(type: "RELATED_TO", direction: OUT) } -type Node2 { +type Node2 @node { relatedTo: [Node1!]! @relationship(type: "RELATED_TO", direction: OUT) } ---- @@ -28,8 +28,8 @@ schema { type Node1 { property: String! - relatedTo(directed: Boolean = true, options: Node2Options, where: Node2Where): [Node2!]! - relatedToConnection(after: String, directed: Boolean = true, first: Int, where: Node1RelatedToConnectionWhere): Node1RelatedToConnection! + relatedTo(limit: Int, offset: Int, where: Node2Where): [Node2!]! + relatedToConnection(after: String, first: Int, where: Node1RelatedToConnectionWhere): Node1RelatedToConnection! } type Node1Edge { @@ -37,15 +37,6 @@ type Node1Edge { node: Node1! } -input Node1Options { - limit: Int - offset: Int - """ - Specify one or more Node1Sort objects to sort Node1s by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [Node1Sort!] -} - type Node1RelatedToConnection { edges: [Node1RelatedToRelationship!]! pageInfo: PageInfo! @@ -75,9 +66,10 @@ input Node1Where { AND: [Node1Where!] NOT: Node1Where OR: [Node1Where!] - property: String + property: String @deprecated(reason: "Please use the explicit _EQ version") property_CONTAINS: String property_ENDS_WITH: String + property_EQ: String property_IN: [String!] property_STARTS_WITH: String """ @@ -113,8 +105,8 @@ type Node1sConnection { } type Node2 { - relatedTo(directed: Boolean = true, options: Node1Options, where: Node1Where): [Node1!]! - relatedToConnection(after: String, directed: Boolean = true, first: Int, sort: [Node2RelatedToConnectionSort!], where: Node2RelatedToConnectionWhere): Node2RelatedToConnection! + relatedTo(limit: Int, offset: Int, sort: [Node1Sort!], where: Node1Where): [Node1!]! + relatedToConnection(after: String, first: Int, sort: [Node2RelatedToConnectionSort!], where: Node2RelatedToConnectionWhere): Node2RelatedToConnection! } type Node2Edge { @@ -122,11 +114,6 @@ type Node2Edge { node: Node2! } -input Node2Options { - limit: Int - offset: Int -} - type Node2RelatedToConnection { edges: [Node2RelatedToRelationship!]! pageInfo: PageInfo! @@ -194,9 +181,9 @@ type PageInfo { } type Query { - node1s(options: Node1Options, where: Node1Where): [Node1!]! - node1sConnection(after: String, first: Int, sort: [Node1Sort], where: Node1Where): Node1sConnection! - node2s(options: Node2Options, where: Node2Where): [Node2!]! + node1s(limit: Int, offset: Int, sort: [Node1Sort!], where: Node1Where): [Node1!]! + node1sConnection(after: String, first: Int, sort: [Node1Sort!], where: Node1Where): Node1sConnection! + node2s(limit: Int, offset: Int, where: Node2Where): [Node2!]! node2sConnection(after: String, first: Int, where: Node2Where): Node2sConnection! } diff --git a/core/src/test/resources/tck-test-files/schema/v2/connections/unions.adoc b/core/src/test/resources/tck-test-files/schema/v2/connections/unions.adoc index ca8ec4f4..9801b9ab 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/connections/unions.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/connections/unions.adoc @@ -10,17 +10,17 @@ ---- union Publication = Book | Journal -type Author { +type Author @node { name: String! publications: [Publication!]! @relationship(type: "WROTE", direction: OUT, properties: "Wrote") } -type Book { +type Book @node { title: String! author: [Author!]! @relationship(type: "WROTE", direction: IN, properties: "Wrote") } -type Journal { +type Journal @node { subject: String! author: [Author!]! @relationship(type: "WROTE", direction: IN, properties: "Wrote") } @@ -41,8 +41,8 @@ union Publication = Book | Journal type Author { name: String! - publications(directed: Boolean = true, options: QueryOptions, where: PublicationWhere): [Publication!]! - publicationsConnection(after: String, directed: Boolean = true, first: Int, sort: [AuthorPublicationsConnectionSort!], where: AuthorPublicationsConnectionWhere): AuthorPublicationsConnection! + publications(limit: Int, offset: Int, where: PublicationWhere): [Publication!]! + publicationsConnection(after: String, first: Int, sort: [AuthorPublicationsConnectionSort!], where: AuthorPublicationsConnectionWhere): AuthorPublicationsConnection! } type AuthorEdge { @@ -69,8 +69,8 @@ type AuthorsConnection { } type Book { - author(directed: Boolean = true, options: AuthorOptions, where: AuthorWhere): [Author!]! - authorConnection(after: String, directed: Boolean = true, first: Int, sort: [BookAuthorConnectionSort!], where: BookAuthorConnectionWhere): BookAuthorConnection! + author(limit: Int, offset: Int, sort: [AuthorSort!], where: AuthorWhere): [Author!]! + authorConnection(after: String, first: Int, sort: [BookAuthorConnectionSort!], where: BookAuthorConnectionWhere): BookAuthorConnection! title: String! } @@ -98,8 +98,8 @@ type BooksConnection { } type Journal { - author(directed: Boolean = true, options: AuthorOptions, where: AuthorWhere): [Author!]! - authorConnection(after: String, directed: Boolean = true, first: Int, sort: [JournalAuthorConnectionSort!], where: JournalAuthorConnectionWhere): JournalAuthorConnection! + author(limit: Int, offset: Int, sort: [AuthorSort!], where: AuthorWhere): [Author!]! + authorConnection(after: String, first: Int, sort: [JournalAuthorConnectionSort!], where: JournalAuthorConnectionWhere): JournalAuthorConnection! subject: String! } @@ -135,13 +135,13 @@ type PageInfo { } type Query { - authors(options: AuthorOptions, where: AuthorWhere): [Author!]! - authorsConnection(after: String, first: Int, sort: [AuthorSort], where: AuthorWhere): AuthorsConnection! - books(options: BookOptions, where: BookWhere): [Book!]! - booksConnection(after: String, first: Int, sort: [BookSort], where: BookWhere): BooksConnection! - journals(options: JournalOptions, where: JournalWhere): [Journal!]! - journalsConnection(after: String, first: Int, sort: [JournalSort], where: JournalWhere): JournalsConnection! - publications(options: QueryOptions, where: PublicationWhere): [Publication!]! + authors(limit: Int, offset: Int, sort: [AuthorSort!], where: AuthorWhere): [Author!]! + authorsConnection(after: String, first: Int, sort: [AuthorSort!], where: AuthorWhere): AuthorsConnection! + books(limit: Int, offset: Int, sort: [BookSort!], where: BookWhere): [Book!]! + booksConnection(after: String, first: Int, sort: [BookSort!], where: BookWhere): BooksConnection! + journals(limit: Int, offset: Int, sort: [JournalSort!], where: JournalWhere): [Journal!]! + journalsConnection(after: String, first: Int, sort: [JournalSort!], where: JournalWhere): JournalsConnection! + publications(limit: Int, offset: Int, where: PublicationWhere): [Publication!]! } """ @@ -162,13 +162,6 @@ enum SortDirection { DESC } -input AuthorOptions { - limit: Int - offset: Int - "Specify one or more AuthorSort objects to sort Authors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [AuthorSort!] -} - input AuthorPublicationsBookConnectionWhere { AND: [AuthorPublicationsBookConnectionWhere!] NOT: AuthorPublicationsBookConnectionWhere @@ -203,9 +196,10 @@ input AuthorWhere { AND: [AuthorWhere!] NOT: AuthorWhere OR: [AuthorWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String "Return Authors where all of the related AuthorPublicationsConnections match this filter" @@ -239,13 +233,6 @@ input BookAuthorConnectionWhere { node: AuthorWhere } -input BookOptions { - limit: Int - offset: Int - "Specify one or more BookSort objects to sort Books by. The sorts will be applied in the order in which they are arranged in the array." - sort: [BookSort!] -} - "Fields to sort Books by. The order in which sorts are applied is not guaranteed when specifying many fields in one BookSort object." input BookSort { title: SortDirection @@ -271,9 +258,10 @@ input BookWhere { author_SINGLE: AuthorWhere "Return Books where some of the related Authors match this filter" author_SOME: AuthorWhere - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } @@ -291,13 +279,6 @@ input JournalAuthorConnectionWhere { node: AuthorWhere } -input JournalOptions { - limit: Int - offset: Int - "Specify one or more JournalSort objects to sort Journals by. The sorts will be applied in the order in which they are arranged in the array." - sort: [JournalSort!] -} - "Fields to sort Journals by. The order in which sorts are applied is not guaranteed when specifying many fields in one JournalSort object." input JournalSort { subject: SortDirection @@ -323,9 +304,10 @@ input JournalWhere { author_SINGLE: AuthorWhere "Return Journals where some of the related Authors match this filter" author_SOME: AuthorWhere - subject: String + subject: String @deprecated(reason : "Please use the explicit _EQ version") subject_CONTAINS: String subject_ENDS_WITH: String + subject_EQ: String subject_IN: [String!] subject_STARTS_WITH: String } @@ -335,12 +317,6 @@ input PublicationWhere { Journal: JournalWhere } -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - input WroteSort { words: SortDirection } @@ -349,7 +325,8 @@ input WroteWhere { AND: [WroteWhere!] NOT: WroteWhere OR: [WroteWhere!] - words: Int + words: Int @deprecated(reason : "Please use the explicit _EQ version") + words_EQ: Int words_GT: Int words_GTE: Int words_IN: [Int!] diff --git a/core/src/test/resources/tck-test-files/schema/v2/connections/unions.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/connections/unions.js.adoc index c347d1e5..36aa39bd 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/connections/unions.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/connections/unions.js.adoc @@ -11,17 +11,17 @@ ---- union Publication = Book | Journal -type Author { +type Author @node { name: String! publications: [Publication!]! @relationship(type: "WROTE", direction: OUT, properties: "Wrote") } -type Book { +type Book @node { title: String! author: [Author!]! @relationship(type: "WROTE", direction: IN, properties: "Wrote") } -type Journal { +type Journal @node { subject: String! author: [Author!]! @relationship(type: "WROTE", direction: IN, properties: "Wrote") } @@ -40,8 +40,8 @@ schema { type Author { name: String! - publications(directed: Boolean = true, options: QueryOptions, where: PublicationWhere): [Publication!]! - publicationsConnection(after: String, directed: Boolean = true, first: Int, sort: [AuthorPublicationsConnectionSort!], where: AuthorPublicationsConnectionWhere): AuthorPublicationsConnection! + publications(limit: Int, offset: Int, where: PublicationWhere): [Publication!]! + publicationsConnection(after: String, first: Int, sort: [AuthorPublicationsConnectionSort!], where: AuthorPublicationsConnectionWhere): AuthorPublicationsConnection! } type AuthorEdge { @@ -49,15 +49,6 @@ type AuthorEdge { node: Author! } -input AuthorOptions { - limit: Int - offset: Int - """ - Specify one or more AuthorSort objects to sort Authors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [AuthorSort!] -} - input AuthorPublicationsBookConnectionWhere { AND: [AuthorPublicationsBookConnectionWhere!] NOT: AuthorPublicationsBookConnectionWhere @@ -106,9 +97,10 @@ input AuthorWhere { AND: [AuthorWhere!] NOT: AuthorWhere OR: [AuthorWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String """ @@ -148,8 +140,8 @@ type AuthorsConnection { } type Book { - author(directed: Boolean = true, options: AuthorOptions, where: AuthorWhere): [Author!]! - authorConnection(after: String, directed: Boolean = true, first: Int, sort: [BookAuthorConnectionSort!], where: BookAuthorConnectionWhere): BookAuthorConnection! + author(limit: Int, offset: Int, sort: [AuthorSort!], where: AuthorWhere): [Author!]! + authorConnection(after: String, first: Int, sort: [BookAuthorConnectionSort!], where: BookAuthorConnectionWhere): BookAuthorConnection! title: String! } @@ -183,15 +175,6 @@ type BookEdge { node: Book! } -input BookOptions { - limit: Int - offset: Int - """ - Specify one or more BookSort objects to sort Books by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [BookSort!] -} - """ Fields to sort Books by. The order in which sorts are applied is not guaranteed when specifying many fields in one BookSort object. """ @@ -227,9 +210,10 @@ input BookWhere { author_SINGLE: AuthorWhere """Return Books where some of the related Authors match this filter""" author_SOME: AuthorWhere - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } @@ -241,8 +225,8 @@ type BooksConnection { } type Journal { - author(directed: Boolean = true, options: AuthorOptions, where: AuthorWhere): [Author!]! - authorConnection(after: String, directed: Boolean = true, first: Int, sort: [JournalAuthorConnectionSort!], where: JournalAuthorConnectionWhere): JournalAuthorConnection! + author(limit: Int, offset: Int, sort: [AuthorSort!], where: AuthorWhere): [Author!]! + authorConnection(after: String, first: Int, sort: [JournalAuthorConnectionSort!], where: JournalAuthorConnectionWhere): JournalAuthorConnection! subject: String! } @@ -276,15 +260,6 @@ type JournalEdge { node: Journal! } -input JournalOptions { - limit: Int - offset: Int - """ - Specify one or more JournalSort objects to sort Journals by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [JournalSort!] -} - """ Fields to sort Journals by. The order in which sorts are applied is not guaranteed when specifying many fields in one JournalSort object. """ @@ -320,9 +295,10 @@ input JournalWhere { author_SINGLE: AuthorWhere """Return Journals where some of the related Authors match this filter""" author_SOME: AuthorWhere - subject: String + subject: String @deprecated(reason: "Please use the explicit _EQ version") subject_CONTAINS: String subject_ENDS_WITH: String + subject_EQ: String subject_IN: [String!] subject_STARTS_WITH: String } @@ -349,19 +325,13 @@ input PublicationWhere { } type Query { - authors(options: AuthorOptions, where: AuthorWhere): [Author!]! - authorsConnection(after: String, first: Int, sort: [AuthorSort], where: AuthorWhere): AuthorsConnection! - books(options: BookOptions, where: BookWhere): [Book!]! - booksConnection(after: String, first: Int, sort: [BookSort], where: BookWhere): BooksConnection! - journals(options: JournalOptions, where: JournalWhere): [Journal!]! - journalsConnection(after: String, first: Int, sort: [JournalSort], where: JournalWhere): JournalsConnection! - publications(options: QueryOptions, where: PublicationWhere): [Publication!]! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int + authors(limit: Int, offset: Int, sort: [AuthorSort!], where: AuthorWhere): [Author!]! + authorsConnection(after: String, first: Int, sort: [AuthorSort!], where: AuthorWhere): AuthorsConnection! + books(limit: Int, offset: Int, sort: [BookSort!], where: BookWhere): [Book!]! + booksConnection(after: String, first: Int, sort: [BookSort!], where: BookWhere): BooksConnection! + journals(limit: Int, offset: Int, sort: [JournalSort!], where: JournalWhere): [Journal!]! + journalsConnection(after: String, first: Int, sort: [JournalSort!], where: JournalWhere): JournalsConnection! + publications(limit: Int, offset: Int, where: PublicationWhere): [Publication!]! } """An enum for sorting in either ascending or descending order.""" @@ -390,7 +360,8 @@ input WroteWhere { AND: [WroteWhere!] NOT: WroteWhere OR: [WroteWhere!] - words: Int + words: Int @deprecated(reason: "Please use the explicit _EQ version") + words_EQ: Int words_GT: Int words_GTE: Int words_IN: [Int!] diff --git a/core/src/test/resources/tck-test-files/schema/v2/directive-preserve.adoc b/core/src/test/resources/tck-test-files/schema/v2/directive-preserve.adoc index 15e36644..7bce611f 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/directive-preserve.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/directive-preserve.adoc @@ -12,7 +12,7 @@ directive @preservedTopLevel(string: String, int: Int, float: Float, boolean: Bo directive @preservedFieldLevel(string: String, int: Int, float: Float, boolean: Boolean) on FIELD_DEFINITION -type Movie @preservedTopLevel { +type Movie @preservedTopLevel @node { id: ID @preservedFieldLevel(string: "str", int: 12, float: 1.2, boolean: true) } ---- @@ -52,8 +52,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -64,13 +64,6 @@ enum SortDirection { DESC } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -80,9 +73,10 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -94,14 +88,14 @@ input MovieWhere { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String year: Int imdbRating: Float genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT) @deprecated(reason: "Do not use") } -type Genre { +type Genre @node { name: String movies: [Movie!]! @relationship(type: "IN_GENRE", direction: IN) } @@ -115,8 +109,8 @@ schema { } type Genre { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! name: String } @@ -143,8 +137,8 @@ type GenresConnection { } type Movie { - genres(directed: Boolean = true, options: GenreOptions, where: GenreWhere): [Genre!]! @deprecated(reason : "Do not use") - genresConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! @deprecated(reason : "Do not use") + genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! @deprecated(reason : "Do not use") + genresConnection(after: String, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! @deprecated(reason : "Do not use") imdbRating: Float title: String year: Int @@ -181,10 +175,10 @@ type PageInfo { } type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! + genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -206,13 +200,6 @@ input GenreMoviesConnectionWhere { node: MovieWhere } -input GenreOptions { - limit: Int - offset: Int - "Specify one or more GenreSort objects to sort Genres by. The sorts will be applied in the order in which they are arranged in the array." - sort: [GenreSort!] -} - "Fields to sort Genres by. The order in which sorts are applied is not guaranteed when specifying many fields in one GenreSort object." input GenreSort { name: SortDirection @@ -238,9 +225,10 @@ input GenreWhere { movies_SINGLE: MovieWhere "Return Genres where some of the related Movies match this filter" movies_SOME: MovieWhere - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -256,13 +244,6 @@ input MovieGenresConnectionWhere { node: GenreWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { imdbRating: SortDirection @@ -290,18 +271,21 @@ input MovieWhere { genres_SINGLE: GenreWhere @deprecated(reason : "Do not use") "Return Movies where some of the related Genres match this filter" genres_SOME: GenreWhere @deprecated(reason : "Do not use") - imdbRating: Float + imdbRating: Float @deprecated(reason : "Please use the explicit _EQ version") + imdbRating_EQ: Float imdbRating_GT: Float imdbRating_GTE: Float imdbRating_IN: [Float] imdbRating_LT: Float imdbRating_LTE: Float - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String - year: Int + year: Int @deprecated(reason : "Please use the explicit _EQ version") + year_EQ: Int year_GT: Int year_GTE: Int year_IN: [Int] @@ -321,13 +305,13 @@ interface Production { actors: [Actor!]! } -type Movie implements Production { +type Movie implements Production @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") @deprecated(reason: "Do not use") runtime: Int! } -type Series implements Production { +type Series implements Production @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") episodes: Int! @@ -337,7 +321,7 @@ type ActedIn @relationshipProperties { role: String! } -type Actor { +type Actor @node { name: String! actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } @@ -366,8 +350,8 @@ type ActedIn { } type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -395,8 +379,8 @@ type ActorsConnection { } type Movie implements Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! @deprecated(reason : "Do not use") - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @deprecated(reason : "Do not use") + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! @deprecated(reason : "Do not use") + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @deprecated(reason : "Do not use") runtime: Int! title: String! } @@ -444,19 +428,19 @@ type ProductionsConnection { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! + productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! + series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! + seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } type Series implements Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [SeriesActorsConnectionSort!], where: SeriesActorsConnectionWhere): SeriesActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [SeriesActorsConnectionSort!], where: SeriesActorsConnectionWhere): SeriesActorsConnection! episodes: Int! title: String! } @@ -505,9 +489,10 @@ input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - role: String + role: String @deprecated(reason : "Please use the explicit _EQ version") role_CONTAINS: String role_ENDS_WITH: String + role_EQ: String role_IN: [String!] role_STARTS_WITH: String } @@ -525,13 +510,6 @@ input ActorActedInConnectionWhere { node: ProductionWhere } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { name: SortDirection @@ -557,9 +535,10 @@ input ActorWhere { actedIn_SINGLE: ProductionWhere "Return Actors where some of the related Productions match this filter" actedIn_SOME: ProductionWhere - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } @@ -577,13 +556,6 @@ input MovieActorsConnectionWhere { node: ActorWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { runtime: SortDirection @@ -610,26 +582,21 @@ input MovieWhere { actors_SINGLE: ActorWhere @deprecated(reason : "Do not use") "Return Movies where some of the related Actors match this filter" actors_SOME: ActorWhere @deprecated(reason : "Do not use") - runtime: Int + runtime: Int @deprecated(reason : "Please use the explicit _EQ version") + runtime_EQ: Int runtime_GT: Int runtime_GTE: Int runtime_IN: [Int!] runtime_LT: Int runtime_LTE: Int - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } -input ProductionOptions { - limit: Int - offset: Int - "Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ProductionSort] -} - "Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object." input ProductionSort { title: SortDirection @@ -639,12 +606,13 @@ input ProductionWhere { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] } input SeriesActorsConnectionSort { @@ -660,13 +628,6 @@ input SeriesActorsConnectionWhere { node: ActorWhere } -input SeriesOptions { - limit: Int - offset: Int - "Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array." - sort: [SeriesSort!] -} - "Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object." input SeriesSort { episodes: SortDirection @@ -693,15 +654,17 @@ input SeriesWhere { actors_SINGLE: ActorWhere "Return Series where some of the related Actors match this filter" actors_SOME: ActorWhere - episodes: Int + episodes: Int @deprecated(reason : "Please use the explicit _EQ version") + episodes_EQ: Int episodes_GT: Int episodes_GTE: Int episodes_IN: [Int!] episodes_LT: Int episodes_LTE: Int - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } @@ -718,13 +681,13 @@ interface Production { actors: [Actor!]! @deprecated(reason: "Do not use") } -type Movie implements Production { +type Movie implements Production @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") runtime: Int! } -type Series implements Production { +type Series implements Production @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") episodes: Int! @@ -734,7 +697,7 @@ type ActedIn @relationshipProperties { role: String! } -type Actor { +type Actor @node { name: String! actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } @@ -763,8 +726,8 @@ type ActedIn { } type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -792,8 +755,8 @@ type ActorsConnection { } type Movie implements Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! runtime: Int! title: String! } @@ -841,19 +804,19 @@ type ProductionsConnection { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! + productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! + series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! + seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } type Series implements Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [SeriesActorsConnectionSort!], where: SeriesActorsConnectionWhere): SeriesActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [SeriesActorsConnectionSort!], where: SeriesActorsConnectionWhere): SeriesActorsConnection! episodes: Int! title: String! } @@ -902,9 +865,10 @@ input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - role: String + role: String @deprecated(reason : "Please use the explicit _EQ version") role_CONTAINS: String role_ENDS_WITH: String + role_EQ: String role_IN: [String!] role_STARTS_WITH: String } @@ -922,13 +886,6 @@ input ActorActedInConnectionWhere { node: ProductionWhere } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { name: SortDirection @@ -954,9 +911,10 @@ input ActorWhere { actedIn_SINGLE: ProductionWhere "Return Actors where some of the related Productions match this filter" actedIn_SOME: ProductionWhere - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } @@ -974,13 +932,6 @@ input MovieActorsConnectionWhere { node: ActorWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { runtime: SortDirection @@ -1007,26 +958,21 @@ input MovieWhere { actors_SINGLE: ActorWhere "Return Movies where some of the related Actors match this filter" actors_SOME: ActorWhere - runtime: Int + runtime: Int @deprecated(reason : "Please use the explicit _EQ version") + runtime_EQ: Int runtime_GT: Int runtime_GTE: Int runtime_IN: [Int!] runtime_LT: Int runtime_LTE: Int - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } -input ProductionOptions { - limit: Int - offset: Int - "Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ProductionSort] -} - "Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object." input ProductionSort { title: SortDirection @@ -1036,12 +982,13 @@ input ProductionWhere { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] } input SeriesActorsConnectionSort { @@ -1057,13 +1004,6 @@ input SeriesActorsConnectionWhere { node: ActorWhere } -input SeriesOptions { - limit: Int - offset: Int - "Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array." - sort: [SeriesSort!] -} - "Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object." input SeriesSort { episodes: SortDirection @@ -1090,15 +1030,17 @@ input SeriesWhere { actors_SINGLE: ActorWhere "Return Series where some of the related Actors match this filter" actors_SOME: ActorWhere - episodes: Int + episodes: Int @deprecated(reason : "Please use the explicit _EQ version") + episodes_EQ: Int episodes_GT: Int episodes_GTE: Int episodes_IN: [Int!] episodes_LT: Int episodes_LTE: Int - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } @@ -1112,16 +1054,16 @@ input SeriesWhere { ---- union Content = Blog | Post -type Blog { +type Blog @node { title: String posts: [Post!]! @relationship(type: "HAS_POST", direction: OUT) } -type Post { +type Post @node { content: String @deprecated(reason: "Do not use post.content") } -type User { +type User @node { name: String content: [Content!]! @relationship(type: "HAS_CONTENT", direction: OUT) @deprecated(reason: "Do not use user.content") } @@ -1137,8 +1079,8 @@ schema { union Content = Blog | Post type Blog { - posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! - postsConnection(after: String, directed: Boolean = true, first: Int, sort: [BlogPostsConnectionSort!], where: BlogPostsConnectionWhere): BlogPostsConnection! + posts(limit: Int, offset: Int, sort: [PostSort!], where: PostWhere): [Post!]! + postsConnection(after: String, first: Int, sort: [BlogPostsConnectionSort!], where: BlogPostsConnectionWhere): BlogPostsConnection! title: String } @@ -1188,18 +1130,18 @@ type PostsConnection { } type Query { - blogs(options: BlogOptions, where: BlogWhere): [Blog!]! - blogsConnection(after: String, first: Int, sort: [BlogSort], where: BlogWhere): BlogsConnection! - contents(options: QueryOptions, where: ContentWhere): [Content!]! - posts(options: PostOptions, where: PostWhere): [Post!]! - postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! + blogs(limit: Int, offset: Int, sort: [BlogSort!], where: BlogWhere): [Blog!]! + blogsConnection(after: String, first: Int, sort: [BlogSort!], where: BlogWhere): BlogsConnection! + contents(limit: Int, offset: Int, where: ContentWhere): [Content!]! + posts(limit: Int, offset: Int, sort: [PostSort!], where: PostWhere): [Post!]! + postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! + users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! + usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } type User { - content(directed: Boolean = true, options: QueryOptions, where: ContentWhere): [Content!]! @deprecated(reason : "Do not use user.content") - contentConnection(after: String, directed: Boolean = true, first: Int, where: UserContentConnectionWhere): UserContentConnection! @deprecated(reason : "Do not use user.content") + content(limit: Int, offset: Int, where: ContentWhere): [Content!]! @deprecated(reason : "Do not use user.content") + contentConnection(after: String, first: Int, where: UserContentConnectionWhere): UserContentConnection! @deprecated(reason : "Do not use user.content") name: String } @@ -1233,13 +1175,6 @@ enum SortDirection { DESC } -input BlogOptions { - limit: Int - offset: Int - "Specify one or more BlogSort objects to sort Blogs by. The sorts will be applied in the order in which they are arranged in the array." - sort: [BlogSort!] -} - input BlogPostsConnectionSort { node: PostSort } @@ -1276,9 +1211,10 @@ input BlogWhere { posts_SINGLE: PostWhere "Return Blogs where some of the related Posts match this filter" posts_SOME: PostWhere - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } @@ -1288,13 +1224,6 @@ input ContentWhere { Post: PostWhere } -input PostOptions { - limit: Int - offset: Int - "Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PostSort!] -} - "Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object." input PostSort { content: SortDirection @deprecated(reason : "Do not use post.content") @@ -1307,16 +1236,11 @@ input PostWhere { content: String @deprecated(reason : "Do not use post.content") content_CONTAINS: String @deprecated(reason : "Do not use post.content") content_ENDS_WITH: String @deprecated(reason : "Do not use post.content") + content_EQ: String @deprecated(reason : "Do not use post.content") content_IN: [String] @deprecated(reason : "Do not use post.content") content_STARTS_WITH: String @deprecated(reason : "Do not use post.content") } -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - input UserContentBlogConnectionWhere { AND: [UserContentBlogConnectionWhere!] NOT: UserContentBlogConnectionWhere @@ -1336,13 +1260,6 @@ input UserContentPostConnectionWhere { node: PostWhere } -input UserOptions { - limit: Int - offset: Int - "Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array." - sort: [UserSort!] -} - "Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object." input UserSort { name: SortDirection @@ -1368,9 +1285,10 @@ input UserWhere { content_SINGLE: ContentWhere @deprecated(reason : "Do not use user.content") "Return Users where some of the related Contents match this filter" content_SOME: ContentWhere @deprecated(reason : "Do not use user.content") - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } diff --git a/core/src/test/resources/tck-test-files/schema/v2/directive-preserve.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/directive-preserve.js.adoc index ac195bb3..cc5a9d1b 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/directive-preserve.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/directive-preserve.js.adoc @@ -13,7 +13,7 @@ directive @preservedTopLevel(string: String, int: Int, float: Float, boolean: Bo directive @preservedFieldLevel(string: String, int: Int, float: Float, boolean: Boolean) on FIELD_DEFINITION -type Movie @preservedTopLevel { +type Movie @preservedTopLevel @node { id: ID @preservedFieldLevel(string: "str", int: 12, float: 1.2, boolean: true) } ---- @@ -38,15 +38,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -58,9 +49,10 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -80,8 +72,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" @@ -98,14 +90,14 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String year: Int imdbRating: Float genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT) @deprecated(reason: "Do not use") } -type Genre { +type Genre @node { name: String movies: [Movie!]! @relationship(type: "IN_GENRE", direction: IN) } @@ -119,8 +111,8 @@ schema { } type Genre { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! name: String } @@ -151,15 +143,6 @@ type GenreMoviesRelationship { node: Movie! } -input GenreOptions { - limit: Int - offset: Int - """ - Specify one or more GenreSort objects to sort Genres by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [GenreSort!] -} - """ Fields to sort Genres by. The order in which sorts are applied is not guaranteed when specifying many fields in one GenreSort object. """ @@ -195,9 +178,10 @@ input GenreWhere { movies_SINGLE: MovieWhere """Return Genres where some of the related Movies match this filter""" movies_SOME: MovieWhere - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -209,8 +193,8 @@ type GenresConnection { } type Movie { - genres(directed: Boolean = true, options: GenreOptions, where: GenreWhere): [Genre!]! @deprecated(reason: "Do not use") - genresConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! @deprecated(reason: "Do not use") + genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! @deprecated(reason: "Do not use") + genresConnection(after: String, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! @deprecated(reason: "Do not use") imdbRating: Float title: String year: Int @@ -243,15 +227,6 @@ type MovieGenresRelationship { node: Genre! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -289,18 +264,21 @@ input MovieWhere { genres_SINGLE: GenreWhere @deprecated(reason: "Do not use") """Return Movies where some of the related Genres match this filter""" genres_SOME: GenreWhere @deprecated(reason: "Do not use") - imdbRating: Float + imdbRating: Float @deprecated(reason: "Please use the explicit _EQ version") + imdbRating_EQ: Float imdbRating_GT: Float imdbRating_GTE: Float imdbRating_IN: [Float] imdbRating_LT: Float imdbRating_LTE: Float - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String - year: Int + year: Int @deprecated(reason: "Please use the explicit _EQ version") + year_EQ: Int year_GT: Int year_GTE: Int year_IN: [Int] @@ -323,10 +301,10 @@ type PageInfo { } type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! + genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" @@ -348,13 +326,13 @@ interface Production { actors: [Actor!]! } -type Movie implements Production { +type Movie implements Production @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") @deprecated(reason: "Do not use") runtime: Int! } -type Series implements Production { +type Series implements Production @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") episodes: Int! @@ -364,7 +342,7 @@ type ActedIn @relationshipProperties { role: String! } -type Actor { +type Actor @node { name: String! actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } @@ -395,16 +373,17 @@ input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - role: String + role: String @deprecated(reason: "Please use the explicit _EQ version") role_CONTAINS: String role_ENDS_WITH: String + role_EQ: String role_IN: [String!] role_STARTS_WITH: String } type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -438,15 +417,6 @@ type ActorEdge { node: Actor! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -482,9 +452,10 @@ input ActorWhere { actedIn_SINGLE: ProductionWhere """Return Actors where some of the related Productions match this filter""" actedIn_SOME: ProductionWhere - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } @@ -496,8 +467,8 @@ type ActorsConnection { } type Movie implements Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! @deprecated(reason: "Do not use") - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @deprecated(reason: "Do not use") + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! @deprecated(reason: "Do not use") + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @deprecated(reason: "Do not use") runtime: Int! title: String! } @@ -532,15 +503,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -577,15 +539,17 @@ input MovieWhere { actors_SINGLE: ActorWhere @deprecated(reason: "Do not use") """Return Movies where some of the related Actors match this filter""" actors_SOME: ActorWhere @deprecated(reason: "Do not use") - runtime: Int + runtime: Int @deprecated(reason: "Please use the explicit _EQ version") + runtime_EQ: Int runtime_GT: Int runtime_GTE: Int runtime_IN: [Int!] runtime_LT: Int runtime_LTE: Int - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } @@ -619,15 +583,6 @@ enum ProductionImplementation { Series } -input ProductionOptions { - limit: Int - offset: Int - """ - Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ProductionSort] -} - """ Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. """ @@ -639,12 +594,13 @@ input ProductionWhere { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] } type ProductionsConnection { @@ -654,19 +610,19 @@ type ProductionsConnection { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! + productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! + series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! + seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } type Series implements Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [SeriesActorsConnectionSort!], where: SeriesActorsConnectionWhere): SeriesActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [SeriesActorsConnectionSort!], where: SeriesActorsConnectionWhere): SeriesActorsConnection! episodes: Int! title: String! } @@ -707,15 +663,6 @@ type SeriesEdge { node: Series! } -input SeriesOptions { - limit: Int - offset: Int - """ - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [SeriesSort!] -} - """ Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. """ @@ -752,15 +699,17 @@ input SeriesWhere { actors_SINGLE: ActorWhere """Return Series where some of the related Actors match this filter""" actors_SOME: ActorWhere - episodes: Int + episodes: Int @deprecated(reason: "Please use the explicit _EQ version") + episodes_EQ: Int episodes_GT: Int episodes_GTE: Int episodes_IN: [Int!] episodes_LT: Int episodes_LTE: Int - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } @@ -784,13 +733,13 @@ interface Production { actors: [Actor!]! @deprecated(reason: "Do not use") } -type Movie implements Production { +type Movie implements Production @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") runtime: Int! } -type Series implements Production { +type Series implements Production @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") episodes: Int! @@ -800,7 +749,7 @@ type ActedIn @relationshipProperties { role: String! } -type Actor { +type Actor @node { name: String! actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } @@ -831,16 +780,17 @@ input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - role: String + role: String @deprecated(reason: "Please use the explicit _EQ version") role_CONTAINS: String role_ENDS_WITH: String + role_EQ: String role_IN: [String!] role_STARTS_WITH: String } type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -874,15 +824,6 @@ type ActorEdge { node: Actor! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -918,9 +859,10 @@ input ActorWhere { actedIn_SINGLE: ProductionWhere """Return Actors where some of the related Productions match this filter""" actedIn_SOME: ProductionWhere - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } @@ -932,8 +874,8 @@ type ActorsConnection { } type Movie implements Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! runtime: Int! title: String! } @@ -968,15 +910,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -1013,15 +946,17 @@ input MovieWhere { actors_SINGLE: ActorWhere """Return Movies where some of the related Actors match this filter""" actors_SOME: ActorWhere - runtime: Int + runtime: Int @deprecated(reason: "Please use the explicit _EQ version") + runtime_EQ: Int runtime_GT: Int runtime_GTE: Int runtime_IN: [Int!] runtime_LT: Int runtime_LTE: Int - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } @@ -1055,15 +990,6 @@ enum ProductionImplementation { Series } -input ProductionOptions { - limit: Int - offset: Int - """ - Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ProductionSort] -} - """ Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. """ @@ -1075,12 +1001,13 @@ input ProductionWhere { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] } type ProductionsConnection { @@ -1090,19 +1017,19 @@ type ProductionsConnection { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! + productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! + series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! + seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } type Series implements Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [SeriesActorsConnectionSort!], where: SeriesActorsConnectionWhere): SeriesActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [SeriesActorsConnectionSort!], where: SeriesActorsConnectionWhere): SeriesActorsConnection! episodes: Int! title: String! } @@ -1143,15 +1070,6 @@ type SeriesEdge { node: Series! } -input SeriesOptions { - limit: Int - offset: Int - """ - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [SeriesSort!] -} - """ Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. """ @@ -1188,15 +1106,17 @@ input SeriesWhere { actors_SINGLE: ActorWhere """Return Series where some of the related Actors match this filter""" actors_SOME: ActorWhere - episodes: Int + episodes: Int @deprecated(reason: "Please use the explicit _EQ version") + episodes_EQ: Int episodes_GT: Int episodes_GTE: Int episodes_IN: [Int!] episodes_LT: Int episodes_LTE: Int - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } @@ -1217,16 +1137,16 @@ enum SortDirection { ---- union Content = Blog | Post -type Blog { +type Blog @node { title: String posts: [Post!]! @relationship(type: "HAS_POST", direction: OUT) } -type Post { +type Post @node { content: String @deprecated(reason: "Do not use post.content") } -type User { +type User @node { name: String content: [Content!]! @relationship(type: "HAS_CONTENT", direction: OUT) @deprecated(reason: "Do not use user.content") } @@ -1240,8 +1160,8 @@ schema { } type Blog { - posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! - postsConnection(after: String, directed: Boolean = true, first: Int, sort: [BlogPostsConnectionSort!], where: BlogPostsConnectionWhere): BlogPostsConnection! + posts(limit: Int, offset: Int, sort: [PostSort!], where: PostWhere): [Post!]! + postsConnection(after: String, first: Int, sort: [BlogPostsConnectionSort!], where: BlogPostsConnectionWhere): BlogPostsConnection! title: String } @@ -1250,15 +1170,6 @@ type BlogEdge { node: Blog! } -input BlogOptions { - limit: Int - offset: Int - """ - Specify one or more BlogSort objects to sort Blogs by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [BlogSort!] -} - type BlogPostsConnection { edges: [BlogPostsRelationship!]! pageInfo: PageInfo! @@ -1316,9 +1227,10 @@ input BlogWhere { posts_SINGLE: PostWhere """Return Blogs where some of the related Posts match this filter""" posts_SOME: PostWhere - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } @@ -1353,20 +1265,11 @@ type PostEdge { node: Post! } -input PostOptions { - limit: Int - offset: Int - """ - Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PostSort!] -} - """ Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. """ input PostSort { - content: SortDirection @deprecated(reason: "Do not use post.content") + content: SortDirection } input PostWhere { @@ -1376,6 +1279,7 @@ input PostWhere { content: String @deprecated(reason: "Do not use post.content") content_CONTAINS: String @deprecated(reason: "Do not use post.content") content_ENDS_WITH: String @deprecated(reason: "Do not use post.content") + content_EQ: String @deprecated(reason: "Do not use post.content") content_IN: [String] @deprecated(reason: "Do not use post.content") content_STARTS_WITH: String @deprecated(reason: "Do not use post.content") } @@ -1387,19 +1291,13 @@ type PostsConnection { } type Query { - blogs(options: BlogOptions, where: BlogWhere): [Blog!]! - blogsConnection(after: String, first: Int, sort: [BlogSort], where: BlogWhere): BlogsConnection! - contents(options: QueryOptions, where: ContentWhere): [Content!]! - posts(options: PostOptions, where: PostWhere): [Post!]! - postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int + blogs(limit: Int, offset: Int, sort: [BlogSort!], where: BlogWhere): [Blog!]! + blogsConnection(after: String, first: Int, sort: [BlogSort!], where: BlogWhere): BlogsConnection! + contents(limit: Int, offset: Int, where: ContentWhere): [Content!]! + posts(limit: Int, offset: Int, sort: [PostSort!], where: PostWhere): [Post!]! + postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! + users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! + usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } """An enum for sorting in either ascending or descending order.""" @@ -1411,8 +1309,8 @@ enum SortDirection { } type User { - content(directed: Boolean = true, options: QueryOptions, where: ContentWhere): [Content!]! @deprecated(reason: "Do not use user.content") - contentConnection(after: String, directed: Boolean = true, first: Int, where: UserContentConnectionWhere): UserContentConnection! @deprecated(reason: "Do not use user.content") + content(limit: Int, offset: Int, where: ContentWhere): [Content!]! @deprecated(reason: "Do not use user.content") + contentConnection(after: String, first: Int, where: UserContentConnectionWhere): UserContentConnection! @deprecated(reason: "Do not use user.content") name: String } @@ -1451,15 +1349,6 @@ type UserEdge { node: User! } -input UserOptions { - limit: Int - offset: Int - """ - Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [UserSort!] -} - """ Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. """ @@ -1495,9 +1384,10 @@ input UserWhere { content_SINGLE: ContentWhere @deprecated(reason: "Do not use user.content") """Return Users where some of the related Contents match this filter""" content_SOME: ContentWhere @deprecated(reason: "Do not use user.content") - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } diff --git a/core/src/test/resources/tck-test-files/schema/v2/directives/alias.adoc b/core/src/test/resources/tck-test-files/schema/v2/directives/alias.adoc index 6e7cc7bd..52f3dda4 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/directives/alias.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/directives/alias.adoc @@ -8,13 +8,13 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String! city: String @alias(property: "cityPropInDb") actedIn: [Movie!]! @relationship(direction: OUT, type: "ACTED_IN", properties: "ActorActedInProps") } -type Movie { +type Movie @node { title: String! rating: Float @alias(property: "ratingPropInDb") } @@ -33,8 +33,8 @@ schema { } type Actor { - actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! city: String name: String! } @@ -96,10 +96,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -132,12 +132,14 @@ input ActorActedInPropsWhere { AND: [ActorActedInPropsWhere!] NOT: ActorActedInPropsWhere OR: [ActorActedInPropsWhere!] - character: String + character: String @deprecated(reason : "Please use the explicit _EQ version") character_CONTAINS: String character_ENDS_WITH: String + character_EQ: String character_IN: [String!] character_STARTS_WITH: String - screenTime: Int + screenTime: Int @deprecated(reason : "Please use the explicit _EQ version") + screenTime_EQ: Int screenTime_GT: Int screenTime_GTE: Int screenTime_IN: [Int] @@ -145,13 +147,6 @@ input ActorActedInPropsWhere { screenTime_LTE: Int } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { city: SortDirection @@ -178,25 +173,20 @@ input ActorWhere { actedIn_SINGLE: MovieWhere "Return Actors where some of the related Movies match this filter" actedIn_SOME: MovieWhere - city: String + city: String @deprecated(reason : "Please use the explicit _EQ version") city_CONTAINS: String city_ENDS_WITH: String + city_EQ: String city_IN: [String] city_STARTS_WITH: String - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { rating: SortDirection @@ -207,15 +197,17 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - rating: Float + rating: Float @deprecated(reason : "Please use the explicit _EQ version") + rating_EQ: Float rating_GT: Float rating_GTE: Float rating_IN: [Float] rating_LT: Float rating_LTE: Float - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } diff --git a/core/src/test/resources/tck-test-files/schema/v2/directives/alias.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/directives/alias.js.adoc index 8ba3835c..aa84bbcc 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/directives/alias.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/directives/alias.js.adoc @@ -9,13 +9,13 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String! city: String @alias(property: "cityPropInDb") actedIn: [Movie!]! @relationship(direction: OUT, type: "ACTED_IN", properties: "ActorActedInProps") } -type Movie { +type Movie @node { title: String! rating: Float @alias(property: "ratingPropInDb") } @@ -34,8 +34,8 @@ schema { } type Actor { - actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! city: String name: String! } @@ -77,12 +77,14 @@ input ActorActedInPropsWhere { AND: [ActorActedInPropsWhere!] NOT: ActorActedInPropsWhere OR: [ActorActedInPropsWhere!] - character: String + character: String @deprecated(reason: "Please use the explicit _EQ version") character_CONTAINS: String character_ENDS_WITH: String + character_EQ: String character_IN: [String!] character_STARTS_WITH: String - screenTime: Int + screenTime: Int @deprecated(reason: "Please use the explicit _EQ version") + screenTime_EQ: Int screenTime_GT: Int screenTime_GTE: Int screenTime_IN: [Int] @@ -101,15 +103,6 @@ type ActorEdge { node: Actor! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -146,14 +139,16 @@ input ActorWhere { actedIn_SINGLE: MovieWhere """Return Actors where some of the related Movies match this filter""" actedIn_SOME: MovieWhere - city: String + city: String @deprecated(reason: "Please use the explicit _EQ version") city_CONTAINS: String city_ENDS_WITH: String + city_EQ: String city_IN: [String] city_STARTS_WITH: String - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } @@ -174,15 +169,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -195,15 +181,17 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - rating: Float + rating: Float @deprecated(reason: "Please use the explicit _EQ version") + rating_EQ: Float rating_GT: Float rating_GTE: Float rating_IN: [Float] rating_LT: Float rating_LTE: Float - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } @@ -223,10 +211,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/directives/customResolver.adoc b/core/src/test/resources/tck-test-files/schema/v2/directives/customResolver.adoc index 21dcbd55..32596d05 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/directives/customResolver.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/directives/customResolver.adoc @@ -12,7 +12,7 @@ interface UserInterface { customResolver: String } -type User implements UserInterface { +type User implements UserInterface @node { id: ID! username: String! password: String! @@ -41,10 +41,10 @@ type PageInfo { } type Query { - userInterfaces(options: UserInterfaceOptions, where: UserInterfaceWhere): [UserInterface!]! - userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort], where: UserInterfaceWhere): UserInterfacesConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! + userInterfaces(limit: Int, offset: Int, sort: [UserInterfaceSort!], where: UserInterfaceWhere): [UserInterface!]! + userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort!], where: UserInterfaceWhere): UserInterfacesConnection! + users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! + usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } type User implements UserInterface { @@ -89,13 +89,6 @@ enum UserInterfaceImplementation { User } -input UserInterfaceOptions { - limit: Int - offset: Int - "Specify one or more UserInterfaceSort objects to sort UserInterfaces by. The sorts will be applied in the order in which they are arranged in the array." - sort: [UserInterfaceSort] -} - "Fields to sort UserInterfaces by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserInterfaceSort object." input UserInterfaceSort { customResolver: SortDirection @@ -105,19 +98,13 @@ input UserInterfaceWhere { AND: [UserInterfaceWhere!] NOT: UserInterfaceWhere OR: [UserInterfaceWhere!] - customResolver: String + customResolver: String @deprecated(reason : "Please use the explicit _EQ version") customResolver_CONTAINS: String customResolver_ENDS_WITH: String + customResolver_EQ: String customResolver_IN: [String] customResolver_STARTS_WITH: String - typename_IN: [UserInterfaceImplementation!] -} - -input UserOptions { - limit: Int - offset: Int - "Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array." - sort: [UserSort!] + typename: [UserInterfaceImplementation!] } "Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object." @@ -131,19 +118,22 @@ input UserWhere { AND: [UserWhere!] NOT: UserWhere OR: [UserWhere!] - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID!] id_STARTS_WITH: ID - password: String + password: String @deprecated(reason : "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason : "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } diff --git a/core/src/test/resources/tck-test-files/schema/v2/directives/customResolver.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/directives/customResolver.js.adoc index c409a002..a3281b24 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/directives/customResolver.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/directives/customResolver.js.adoc @@ -13,7 +13,7 @@ interface UserInterface { customResolver: String } -type User implements UserInterface { +type User implements UserInterface @node { id: ID! username: String! password: String! @@ -38,10 +38,10 @@ type PageInfo { } type Query { - userInterfaces(options: UserInterfaceOptions, where: UserInterfaceWhere): [UserInterface!]! - userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort], where: UserInterfaceWhere): UserInterfacesConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! + userInterfaces(limit: Int, offset: Int, sort: [UserInterfaceSort!], where: UserInterfaceWhere): [UserInterface!]! + userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort!], where: UserInterfaceWhere): UserInterfacesConnection! + users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! + usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } """An enum for sorting in either ascending or descending order.""" @@ -78,15 +78,6 @@ enum UserInterfaceImplementation { User } -input UserInterfaceOptions { - limit: Int - offset: Int - """ - Specify one or more UserInterfaceSort objects to sort UserInterfaces by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [UserInterfaceSort] -} - """ Fields to sort UserInterfaces by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserInterfaceSort object. """ @@ -98,12 +89,13 @@ input UserInterfaceWhere { AND: [UserInterfaceWhere!] NOT: UserInterfaceWhere OR: [UserInterfaceWhere!] - customResolver: String + customResolver: String @deprecated(reason: "Please use the explicit _EQ version") customResolver_CONTAINS: String customResolver_ENDS_WITH: String + customResolver_EQ: String customResolver_IN: [String] customResolver_STARTS_WITH: String - typename_IN: [UserInterfaceImplementation!] + typename: [UserInterfaceImplementation!] } type UserInterfacesConnection { @@ -112,15 +104,6 @@ type UserInterfacesConnection { totalCount: Int! } -input UserOptions { - limit: Int - offset: Int - """ - Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [UserSort!] -} - """ Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. """ @@ -134,19 +117,22 @@ input UserWhere { AND: [UserWhere!] NOT: UserWhere OR: [UserWhere!] - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID!] id_STARTS_WITH: ID - password: String + password: String @deprecated(reason: "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason: "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } diff --git a/core/src/test/resources/tck-test-files/schema/v2/directives/default.adoc b/core/src/test/resources/tck-test-files/schema/v2/directives/default.adoc index c7ea58d1..44e811bc 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/directives/default.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/directives/default.adoc @@ -13,7 +13,7 @@ interface UserInterface { toBeOverridden: String! } -type User implements UserInterface { +type User implements UserInterface @node { id: ID! @default(value: "00000000-00000000-00000000-00000000") name: String! @default(value: "Jane Smith") verified: Boolean! @default(value: false) @@ -53,10 +53,10 @@ type PageInfo { } type Query { - userInterfaces(options: UserInterfaceOptions, where: UserInterfaceWhere): [UserInterface!]! - userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort], where: UserInterfaceWhere): UserInterfacesConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! + userInterfaces(limit: Int, offset: Int, sort: [UserInterfaceSort!], where: UserInterfaceWhere): [UserInterface!]! + userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort!], where: UserInterfaceWhere): UserInterfacesConnection! + users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! + usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } type User implements UserInterface { @@ -114,13 +114,6 @@ enum UserInterfaceImplementation { "A date and time, represented as an ISO-8601 string" scalar DateTime -input UserInterfaceOptions { - limit: Int - offset: Int - "Specify one or more UserInterfaceSort objects to sort UserInterfaces by. The sorts will be applied in the order in which they are arranged in the array." - sort: [UserInterfaceSort] -} - "Fields to sort UserInterfaces by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserInterfaceSort object." input UserInterfaceSort { fromInterface: SortDirection @@ -131,24 +124,19 @@ input UserInterfaceWhere { AND: [UserInterfaceWhere!] NOT: UserInterfaceWhere OR: [UserInterfaceWhere!] - fromInterface: String + fromInterface: String @deprecated(reason : "Please use the explicit _EQ version") fromInterface_CONTAINS: String fromInterface_ENDS_WITH: String + fromInterface_EQ: String fromInterface_IN: [String!] fromInterface_STARTS_WITH: String - toBeOverridden: String + toBeOverridden: String @deprecated(reason : "Please use the explicit _EQ version") toBeOverridden_CONTAINS: String toBeOverridden_ENDS_WITH: String + toBeOverridden_EQ: String toBeOverridden_IN: [String!] toBeOverridden_STARTS_WITH: String - typename_IN: [UserInterfaceImplementation!] -} - -input UserOptions { - limit: Int - offset: Int - "Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array." - sort: [UserSort!] + typename: [UserInterfaceImplementation!] } "Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object." @@ -168,47 +156,56 @@ input UserWhere { AND: [UserWhere!] NOT: UserWhere OR: [UserWhere!] - fromInterface: String + fromInterface: String @deprecated(reason : "Please use the explicit _EQ version") fromInterface_CONTAINS: String fromInterface_ENDS_WITH: String + fromInterface_EQ: String fromInterface_IN: [String!] fromInterface_STARTS_WITH: String - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID!] id_STARTS_WITH: ID - location: Location + location: Location @deprecated(reason : "Please use the explicit _EQ version") + location_EQ: Location location_IN: [Location!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String - numberOfFriends: Int + numberOfFriends: Int @deprecated(reason : "Please use the explicit _EQ version") + numberOfFriends_EQ: Int numberOfFriends_GT: Int numberOfFriends_GTE: Int numberOfFriends_IN: [Int!] numberOfFriends_LT: Int numberOfFriends_LTE: Int - rating: Float + rating: Float @deprecated(reason : "Please use the explicit _EQ version") + rating_EQ: Float rating_GT: Float rating_GTE: Float rating_IN: [Float!] rating_LT: Float rating_LTE: Float - toBeOverridden: String + toBeOverridden: String @deprecated(reason : "Please use the explicit _EQ version") toBeOverridden_CONTAINS: String toBeOverridden_ENDS_WITH: String + toBeOverridden_EQ: String toBeOverridden_IN: [String!] toBeOverridden_STARTS_WITH: String - verified: Boolean - verifiedDate: DateTime + verified: Boolean @deprecated(reason : "Please use the explicit _EQ version") + verifiedDate: DateTime @deprecated(reason : "Please use the explicit _EQ version") + verifiedDate_EQ: DateTime verifiedDate_GT: DateTime verifiedDate_GTE: DateTime verifiedDate_IN: [DateTime!] verifiedDate_LT: DateTime verifiedDate_LTE: DateTime + verified_EQ: Boolean } ---- diff --git a/core/src/test/resources/tck-test-files/schema/v2/directives/default.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/directives/default.js.adoc index 2df2b059..d185b528 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/directives/default.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/directives/default.js.adoc @@ -14,7 +14,7 @@ interface UserInterface { toBeOverridden: String! } -type User implements UserInterface { +type User implements UserInterface @node { id: ID! @default(value: "00000000-00000000-00000000-00000000") name: String! @default(value: "Jane Smith") verified: Boolean! @default(value: false) @@ -58,10 +58,10 @@ type PageInfo { } type Query { - userInterfaces(options: UserInterfaceOptions, where: UserInterfaceWhere): [UserInterface!]! - userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort], where: UserInterfaceWhere): UserInterfacesConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! + userInterfaces(limit: Int, offset: Int, sort: [UserInterfaceSort!], where: UserInterfaceWhere): [UserInterface!]! + userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort!], where: UserInterfaceWhere): UserInterfacesConnection! + users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! + usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } """An enum for sorting in either ascending or descending order.""" @@ -103,15 +103,6 @@ enum UserInterfaceImplementation { User } -input UserInterfaceOptions { - limit: Int - offset: Int - """ - Specify one or more UserInterfaceSort objects to sort UserInterfaces by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [UserInterfaceSort] -} - """ Fields to sort UserInterfaces by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserInterfaceSort object. """ @@ -124,17 +115,19 @@ input UserInterfaceWhere { AND: [UserInterfaceWhere!] NOT: UserInterfaceWhere OR: [UserInterfaceWhere!] - fromInterface: String + fromInterface: String @deprecated(reason: "Please use the explicit _EQ version") fromInterface_CONTAINS: String fromInterface_ENDS_WITH: String + fromInterface_EQ: String fromInterface_IN: [String!] fromInterface_STARTS_WITH: String - toBeOverridden: String + toBeOverridden: String @deprecated(reason: "Please use the explicit _EQ version") toBeOverridden_CONTAINS: String toBeOverridden_ENDS_WITH: String + toBeOverridden_EQ: String toBeOverridden_IN: [String!] toBeOverridden_STARTS_WITH: String - typename_IN: [UserInterfaceImplementation!] + typename: [UserInterfaceImplementation!] } type UserInterfacesConnection { @@ -143,15 +136,6 @@ type UserInterfacesConnection { totalCount: Int! } -input UserOptions { - limit: Int - offset: Int - """ - Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [UserSort!] -} - """ Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. """ @@ -171,47 +155,56 @@ input UserWhere { AND: [UserWhere!] NOT: UserWhere OR: [UserWhere!] - fromInterface: String + fromInterface: String @deprecated(reason: "Please use the explicit _EQ version") fromInterface_CONTAINS: String fromInterface_ENDS_WITH: String + fromInterface_EQ: String fromInterface_IN: [String!] fromInterface_STARTS_WITH: String - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID!] id_STARTS_WITH: ID - location: Location + location: Location @deprecated(reason: "Please use the explicit _EQ version") + location_EQ: Location location_IN: [Location!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String - numberOfFriends: Int + numberOfFriends: Int @deprecated(reason: "Please use the explicit _EQ version") + numberOfFriends_EQ: Int numberOfFriends_GT: Int numberOfFriends_GTE: Int numberOfFriends_IN: [Int!] numberOfFriends_LT: Int numberOfFriends_LTE: Int - rating: Float + rating: Float @deprecated(reason: "Please use the explicit _EQ version") + rating_EQ: Float rating_GT: Float rating_GTE: Float rating_IN: [Float!] rating_LT: Float rating_LTE: Float - toBeOverridden: String + toBeOverridden: String @deprecated(reason: "Please use the explicit _EQ version") toBeOverridden_CONTAINS: String toBeOverridden_ENDS_WITH: String + toBeOverridden_EQ: String toBeOverridden_IN: [String!] toBeOverridden_STARTS_WITH: String - verified: Boolean - verifiedDate: DateTime + verified: Boolean @deprecated(reason: "Please use the explicit _EQ version") + verifiedDate: DateTime @deprecated(reason: "Please use the explicit _EQ version") + verifiedDate_EQ: DateTime verifiedDate_GT: DateTime verifiedDate_GTE: DateTime verifiedDate_IN: [DateTime!] verifiedDate_LT: DateTime verifiedDate_LTE: DateTime + verified_EQ: Boolean } type UsersConnection { diff --git a/core/src/test/resources/tck-test-files/schema/v2/directives/filterable.adoc b/core/src/test/resources/tck-test-files/schema/v2/directives/filterable.adoc index 0c061f0b..1b7492e1 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/directives/filterable.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/directives/filterable.adoc @@ -10,7 +10,7 @@ .Schema [source,graphql,schema=true] ---- -type Actor implements Person { +type Actor implements Person @node { username: String! password: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -20,7 +20,7 @@ interface Person { username: String! } -type Movie { +type Movie @node { title: String actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable(byValue: false) } @@ -38,8 +38,8 @@ interface Person { } type Actor implements Person { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! } @@ -67,8 +67,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -114,12 +114,12 @@ type PersonEdge { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } enum PersonImplementation { @@ -145,13 +145,6 @@ input ActorMoviesConnectionWhere { node: MovieWhere } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { password: SortDirection @@ -178,14 +171,16 @@ input ActorWhere { movies_SINGLE: MovieWhere "Return Actors where some of the related Movies match this filter" movies_SOME: MovieWhere - password: String + password: String @deprecated(reason : "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason : "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } @@ -201,13 +196,6 @@ input MovieActorsConnectionWhere { node: PersonWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { title: SortDirection @@ -217,20 +205,14 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort] -} - "Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." input PersonSort { username: SortDirection @@ -240,34 +222,35 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - typename_IN: [PersonImplementation!] - username: String + typename: [PersonImplementation!] + username: String @deprecated(reason : "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } ---- -== snapshot tests - -=== on SCALAR - -==== default arguments should disable aggregation +=== default arguments should disable aggregation .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor implements Person @node { username: String! password: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } -type Movie { - title: String @filterable - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) +interface Person { + username: String! +} + +type Movie @node { + title: String + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable } ---- @@ -278,9 +261,13 @@ schema { query: Query } -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! +interface Person { + username: String! +} + +type Actor implements Person { + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! } @@ -308,8 +295,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -321,7 +308,7 @@ type MovieActorsConnection { type MovieActorsRelationship { cursor: String! - node: Actor! + node: Person! } type MovieEdge { @@ -343,11 +330,28 @@ type PageInfo { startCursor: String } +type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type PersonEdge { + cursor: String! + node: Person! +} + type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! +} + +enum PersonImplementation { + Actor } "An enum for sorting in either ascending or descending order." @@ -369,13 +373,6 @@ input ActorMoviesConnectionWhere { node: MovieWhere } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { password: SortDirection @@ -402,34 +399,29 @@ input ActorWhere { movies_SINGLE: MovieWhere "Return Actors where some of the related Movies match this filter" movies_SOME: MovieWhere - password: String + password: String @deprecated(reason : "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason : "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } input MovieActorsConnectionSort { - node: ActorSort + node: PersonSort } input MovieActorsConnectionWhere { AND: [MovieActorsConnectionWhere!] NOT: MovieActorsConnectionWhere OR: [MovieActorsConnectionWhere!] - node: ActorWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] + node: PersonWhere } "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." @@ -449,39 +441,60 @@ input MovieWhere { actorsConnection_SINGLE: MovieActorsConnectionWhere "Return Movies where some of the related MovieActorsConnections match this filter" actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related Actors match this filter" - actors_ALL: ActorWhere - "Return Movies where none of the related Actors match this filter" - actors_NONE: ActorWhere - "Return Movies where one of the related Actors match this filter" - actors_SINGLE: ActorWhere - "Return Movies where some of the related Actors match this filter" - actors_SOME: ActorWhere - title: String + "Return Movies where all of the related People match this filter" + actors_ALL: PersonWhere + "Return Movies where none of the related People match this filter" + actors_NONE: PersonWhere + "Return Movies where one of the related People match this filter" + actors_SINGLE: PersonWhere + "Return Movies where some of the related People match this filter" + actors_SOME: PersonWhere + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } ----- +"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." +input PersonSort { + username: SortDirection +} -=== on RELATIONSHIP FIELD +input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + typename: [PersonImplementation!] + username: String @deprecated(reason : "Please use the explicit _EQ version") + username_CONTAINS: String + username_ENDS_WITH: String + username_EQ: String + username_IN: [String!] + username_STARTS_WITH: String +} -==== default arguments should disable aggregation +---- + +=== enable only value filters .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor implements Person @node { username: String! password: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } -type Movie { +interface Person { + username: String! +} + +type Movie @node { title: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) @filterable + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable(byValue: true) } ---- @@ -492,9 +505,13 @@ schema { query: Query } -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! +interface Person { + username: String! +} + +type Actor implements Person { + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! } @@ -522,8 +539,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -535,7 +552,7 @@ type MovieActorsConnection { type MovieActorsRelationship { cursor: String! - node: Actor! + node: Person! } type MovieEdge { @@ -557,11 +574,28 @@ type PageInfo { startCursor: String } +type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type PersonEdge { + cursor: String! + node: Person! +} + type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! +} + +enum PersonImplementation { + Actor } "An enum for sorting in either ascending or descending order." @@ -583,13 +617,6 @@ input ActorMoviesConnectionWhere { node: MovieWhere } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { password: SortDirection @@ -616,34 +643,29 @@ input ActorWhere { movies_SINGLE: MovieWhere "Return Actors where some of the related Movies match this filter" movies_SOME: MovieWhere - password: String + password: String @deprecated(reason : "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason : "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } input MovieActorsConnectionSort { - node: ActorSort + node: PersonSort } input MovieActorsConnectionWhere { AND: [MovieActorsConnectionWhere!] NOT: MovieActorsConnectionWhere OR: [MovieActorsConnectionWhere!] - node: ActorWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] + node: PersonWhere } "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." @@ -663,37 +685,66 @@ input MovieWhere { actorsConnection_SINGLE: MovieActorsConnectionWhere "Return Movies where some of the related MovieActorsConnections match this filter" actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related Actors match this filter" - actors_ALL: ActorWhere - "Return Movies where none of the related Actors match this filter" - actors_NONE: ActorWhere - "Return Movies where one of the related Actors match this filter" - actors_SINGLE: ActorWhere - "Return Movies where some of the related Actors match this filter" - actors_SOME: ActorWhere - title: String + "Return Movies where all of the related People match this filter" + actors_ALL: PersonWhere + "Return Movies where none of the related People match this filter" + actors_NONE: PersonWhere + "Return Movies where one of the related People match this filter" + actors_SINGLE: PersonWhere + "Return Movies where some of the related People match this filter" + actors_SOME: PersonWhere + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } +"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." +input PersonSort { + username: SortDirection +} + +input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + typename: [PersonImplementation!] + username: String @deprecated(reason : "Please use the explicit _EQ version") + username_CONTAINS: String + username_ENDS_WITH: String + username_EQ: String + username_IN: [String!] + username_STARTS_WITH: String +} + ---- -==== enable only value filters +== on UNION RELATIONSHIP FIELD, (aggregation are no generated for abstract types) + +=== default arguments should disable aggregation .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { username: String! password: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } -type Movie { +type Appearance @node { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) +} + +union Person = Actor | Appearance + +type Movie @node { title: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) @filterable(byValue: true) + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable } ---- @@ -704,9 +755,11 @@ schema { query: Query } +union Person = Actor | Appearance + type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! } @@ -733,9 +786,38 @@ type ActorsConnection { totalCount: Int! } +type Appearance { + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! + password: String! + username: String! +} + +type AppearanceEdge { + cursor: String! + node: Appearance! +} + +type AppearanceMoviesConnection { + edges: [AppearanceMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type AppearanceMoviesRelationship { + cursor: String! + node: Movie! +} + +type AppearancesConnection { + edges: [AppearanceEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -747,7 +829,7 @@ type MovieActorsConnection { type MovieActorsRelationship { cursor: String! - node: Actor! + node: Person! } type MovieEdge { @@ -770,10 +852,13 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + appearances(limit: Int, offset: Int, sort: [AppearanceSort!], where: AppearanceWhere): [Appearance!]! + appearancesConnection(after: String, first: Int, sort: [AppearanceSort!], where: AppearanceWhere): AppearancesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, where: PersonWhere): [Person!]! } "An enum for sorting in either ascending or descending order." @@ -795,13 +880,6 @@ input ActorMoviesConnectionWhere { node: MovieWhere } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { password: SortDirection @@ -828,39 +906,93 @@ input ActorWhere { movies_SINGLE: MovieWhere "Return Actors where some of the related Movies match this filter" movies_SOME: MovieWhere - password: String + password: String @deprecated(reason : "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason : "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } -input MovieActorsConnectionSort { - node: ActorSort +input AppearanceMoviesConnectionSort { + node: MovieSort } -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere +input AppearanceMoviesConnectionWhere { + AND: [AppearanceMoviesConnectionWhere!] + NOT: AppearanceMoviesConnectionWhere + OR: [AppearanceMoviesConnectionWhere!] + node: MovieWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] +"Fields to sort Appearances by. The order in which sorts are applied is not guaranteed when specifying many fields in one AppearanceSort object." +input AppearanceSort { + password: SortDirection + username: SortDirection } -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - title: SortDirection +input AppearanceWhere { + AND: [AppearanceWhere!] + NOT: AppearanceWhere + OR: [AppearanceWhere!] + "Return Appearances where all of the related AppearanceMoviesConnections match this filter" + moviesConnection_ALL: AppearanceMoviesConnectionWhere + "Return Appearances where none of the related AppearanceMoviesConnections match this filter" + moviesConnection_NONE: AppearanceMoviesConnectionWhere + "Return Appearances where one of the related AppearanceMoviesConnections match this filter" + moviesConnection_SINGLE: AppearanceMoviesConnectionWhere + "Return Appearances where some of the related AppearanceMoviesConnections match this filter" + moviesConnection_SOME: AppearanceMoviesConnectionWhere + "Return Appearances where all of the related Movies match this filter" + movies_ALL: MovieWhere + "Return Appearances where none of the related Movies match this filter" + movies_NONE: MovieWhere + "Return Appearances where one of the related Movies match this filter" + movies_SINGLE: MovieWhere + "Return Appearances where some of the related Movies match this filter" + movies_SOME: MovieWhere + password: String @deprecated(reason : "Please use the explicit _EQ version") + password_CONTAINS: String + password_ENDS_WITH: String + password_EQ: String + password_IN: [String!] + password_STARTS_WITH: String + username: String @deprecated(reason : "Please use the explicit _EQ version") + username_CONTAINS: String + username_ENDS_WITH: String + username_EQ: String + username_IN: [String!] + username_STARTS_WITH: String +} + +input MovieActorsActorConnectionWhere { + AND: [MovieActorsActorConnectionWhere!] + NOT: MovieActorsActorConnectionWhere + OR: [MovieActorsActorConnectionWhere!] + node: ActorWhere +} + +input MovieActorsAppearanceConnectionWhere { + AND: [MovieActorsAppearanceConnectionWhere!] + NOT: MovieActorsAppearanceConnectionWhere + OR: [MovieActorsAppearanceConnectionWhere!] + node: AppearanceWhere +} + +input MovieActorsConnectionWhere { + Actor: MovieActorsActorConnectionWhere + Appearance: MovieActorsAppearanceConnectionWhere +} + +"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." +input MovieSort { + title: SortDirection } input MovieWhere { @@ -875,43 +1007,51 @@ input MovieWhere { actorsConnection_SINGLE: MovieActorsConnectionWhere "Return Movies where some of the related MovieActorsConnections match this filter" actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related Actors match this filter" - actors_ALL: ActorWhere - "Return Movies where none of the related Actors match this filter" - actors_NONE: ActorWhere - "Return Movies where one of the related Actors match this filter" - actors_SINGLE: ActorWhere - "Return Movies where some of the related Actors match this filter" - actors_SOME: ActorWhere - title: String + "Return Movies where all of the related People match this filter" + actors_ALL: PersonWhere + "Return Movies where none of the related People match this filter" + actors_NONE: PersonWhere + "Return Movies where one of the related People match this filter" + actors_SINGLE: PersonWhere + "Return Movies where some of the related People match this filter" + actors_SOME: PersonWhere + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } ----- +input PersonWhere { + Actor: ActorWhere + Appearance: AppearanceWhere +} -=== on INTERFACE RELATIONSHIP FIELD, (aggregation does not exists on abstract types) +---- -==== default arguments should disable aggregation +=== enable only value filters .Schema [source,graphql,schema=true] ---- -type Actor implements Person { +type Actor @node { username: String! password: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } -interface Person { +type Appearance @node { username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } -type Movie { +union Person = Actor | Appearance + +type Movie @node { title: String - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable(byValue: true) } ---- @@ -922,13 +1062,11 @@ schema { query: Query } -interface Person { - username: String! -} +union Person = Actor | Appearance -type Actor implements Person { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! +type Actor { + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! } @@ -955,9 +1093,38 @@ type ActorsConnection { totalCount: Int! } +type Appearance { + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! + password: String! + username: String! +} + +type AppearanceEdge { + cursor: String! + node: Appearance! +} + +type AppearanceMoviesConnection { + edges: [AppearanceMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type AppearanceMoviesRelationship { + cursor: String! + node: Movie! +} + +type AppearancesConnection { + edges: [AppearanceEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -991,28 +1158,14 @@ type PageInfo { startCursor: String } -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonEdge { - cursor: String! - node: Person! -} - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -enum PersonImplementation { - Actor + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + appearances(limit: Int, offset: Int, sort: [AppearanceSort!], where: AppearanceWhere): [Appearance!]! + appearancesConnection(after: String, first: Int, sort: [AppearanceSort!], where: AppearanceWhere): AppearancesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, where: PersonWhere): [Person!]! } "An enum for sorting in either ascending or descending order." @@ -1034,13 +1187,6 @@ input ActorMoviesConnectionWhere { node: MovieWhere } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { password: SortDirection @@ -1067,34 +1213,88 @@ input ActorWhere { movies_SINGLE: MovieWhere "Return Actors where some of the related Movies match this filter" movies_SOME: MovieWhere - password: String + password: String @deprecated(reason : "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason : "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } -input MovieActorsConnectionSort { - node: PersonSort +input AppearanceMoviesConnectionSort { + node: MovieSort } -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere +input AppearanceMoviesConnectionWhere { + AND: [AppearanceMoviesConnectionWhere!] + NOT: AppearanceMoviesConnectionWhere + OR: [AppearanceMoviesConnectionWhere!] + node: MovieWhere +} + +"Fields to sort Appearances by. The order in which sorts are applied is not guaranteed when specifying many fields in one AppearanceSort object." +input AppearanceSort { + password: SortDirection + username: SortDirection } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] +input AppearanceWhere { + AND: [AppearanceWhere!] + NOT: AppearanceWhere + OR: [AppearanceWhere!] + "Return Appearances where all of the related AppearanceMoviesConnections match this filter" + moviesConnection_ALL: AppearanceMoviesConnectionWhere + "Return Appearances where none of the related AppearanceMoviesConnections match this filter" + moviesConnection_NONE: AppearanceMoviesConnectionWhere + "Return Appearances where one of the related AppearanceMoviesConnections match this filter" + moviesConnection_SINGLE: AppearanceMoviesConnectionWhere + "Return Appearances where some of the related AppearanceMoviesConnections match this filter" + moviesConnection_SOME: AppearanceMoviesConnectionWhere + "Return Appearances where all of the related Movies match this filter" + movies_ALL: MovieWhere + "Return Appearances where none of the related Movies match this filter" + movies_NONE: MovieWhere + "Return Appearances where one of the related Movies match this filter" + movies_SINGLE: MovieWhere + "Return Appearances where some of the related Movies match this filter" + movies_SOME: MovieWhere + password: String @deprecated(reason : "Please use the explicit _EQ version") + password_CONTAINS: String + password_ENDS_WITH: String + password_EQ: String + password_IN: [String!] + password_STARTS_WITH: String + username: String @deprecated(reason : "Please use the explicit _EQ version") + username_CONTAINS: String + username_ENDS_WITH: String + username_EQ: String + username_IN: [String!] + username_STARTS_WITH: String +} + +input MovieActorsActorConnectionWhere { + AND: [MovieActorsActorConnectionWhere!] + NOT: MovieActorsActorConnectionWhere + OR: [MovieActorsActorConnectionWhere!] + node: ActorWhere +} + +input MovieActorsAppearanceConnectionWhere { + AND: [MovieActorsAppearanceConnectionWhere!] + NOT: MovieActorsAppearanceConnectionWhere + OR: [MovieActorsAppearanceConnectionWhere!] + node: AppearanceWhere +} + +input MovieActorsConnectionWhere { + Actor: MovieActorsActorConnectionWhere + Appearance: MovieActorsAppearanceConnectionWhere } "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." @@ -1122,57 +1322,39 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort] -} - -"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." -input PersonSort { - username: SortDirection -} - input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - typename_IN: [PersonImplementation!] - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String + Actor: ActorWhere + Appearance: AppearanceWhere } ---- -==== enable only value filters +== snapshot tests + +=== on SCALAR + +==== default arguments should disable aggregation .Schema [source,graphql,schema=true] ---- -type Actor implements Person { +type Actor @node { username: String! password: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } -interface Person { - username: String! -} - -type Movie { - title: String - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable(byValue: true) +type Movie @node { + title: String @filterable + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } ---- @@ -1183,13 +1365,9 @@ schema { query: Query } -interface Person { - username: String! -} - -type Actor implements Person { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! +type Actor { + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! } @@ -1217,8 +1395,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -1230,7 +1408,7 @@ type MovieActorsConnection { type MovieActorsRelationship { cursor: String! - node: Person! + node: Actor! } type MovieEdge { @@ -1252,28 +1430,11 @@ type PageInfo { startCursor: String } -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonEdge { - cursor: String! - node: Person! -} - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -enum PersonImplementation { - Actor + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -1295,13 +1456,6 @@ input ActorMoviesConnectionWhere { node: MovieWhere } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { password: SortDirection @@ -1328,34 +1482,29 @@ input ActorWhere { movies_SINGLE: MovieWhere "Return Actors where some of the related Movies match this filter" movies_SOME: MovieWhere - password: String + password: String @deprecated(reason : "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason : "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } input MovieActorsConnectionSort { - node: PersonSort + node: ActorSort } input MovieActorsConnectionWhere { AND: [MovieActorsConnectionWhere!] NOT: MovieActorsConnectionWhere OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] + node: ActorWhere } "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." @@ -1375,71 +1524,40 @@ input MovieWhere { actorsConnection_SINGLE: MovieActorsConnectionWhere "Return Movies where some of the related MovieActorsConnections match this filter" actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - title: String + "Return Movies where all of the related Actors match this filter" + actors_ALL: ActorWhere + "Return Movies where none of the related Actors match this filter" + actors_NONE: ActorWhere + "Return Movies where one of the related Actors match this filter" + actors_SINGLE: ActorWhere + "Return Movies where some of the related Actors match this filter" + actors_SOME: ActorWhere + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort] -} - -"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." -input PersonSort { - username: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - typename_IN: [PersonImplementation!] - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - ---- -=== on UNION RELATIONSHIP FIELD, (aggregation does not exists on abstract types) +=== on RELATIONSHIP FIELD ==== default arguments should disable aggregation .Schema [source,graphql,schema=true] ---- -type Actor { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} - -type Appearance { +type Actor @node { username: String! password: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } -union Person = Actor | Appearance - -type Movie { +type Movie @node { title: String - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) @filterable } ---- @@ -1450,11 +1568,9 @@ schema { query: Query } -union Person = Actor | Appearance - type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! } @@ -1481,38 +1597,9 @@ type ActorsConnection { totalCount: Int! } -type Appearance { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! - password: String! - username: String! -} - -type AppearanceEdge { - cursor: String! - node: Appearance! -} - -type AppearanceMoviesConnection { - edges: [AppearanceMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type AppearanceMoviesRelationship { - cursor: String! - node: Movie! -} - -type AppearancesConnection { - edges: [AppearanceEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -1524,7 +1611,7 @@ type MovieActorsConnection { type MovieActorsRelationship { cursor: String! - node: Person! + node: Actor! } type MovieEdge { @@ -1547,13 +1634,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - appearances(options: AppearanceOptions, where: AppearanceWhere): [Appearance!]! - appearancesConnection(after: String, first: Int, sort: [AppearanceSort], where: AppearanceWhere): AppearancesConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -1575,13 +1659,6 @@ input ActorMoviesConnectionWhere { node: MovieWhere } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { password: SortDirection @@ -1608,98 +1685,29 @@ input ActorWhere { movies_SINGLE: MovieWhere "Return Actors where some of the related Movies match this filter" movies_SOME: MovieWhere - password: String + password: String @deprecated(reason : "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason : "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } -input AppearanceMoviesConnectionSort { - node: MovieSort -} - -input AppearanceMoviesConnectionWhere { - AND: [AppearanceMoviesConnectionWhere!] - NOT: AppearanceMoviesConnectionWhere - OR: [AppearanceMoviesConnectionWhere!] - node: MovieWhere -} - -input AppearanceOptions { - limit: Int - offset: Int - "Specify one or more AppearanceSort objects to sort Appearances by. The sorts will be applied in the order in which they are arranged in the array." - sort: [AppearanceSort!] -} - -"Fields to sort Appearances by. The order in which sorts are applied is not guaranteed when specifying many fields in one AppearanceSort object." -input AppearanceSort { - password: SortDirection - username: SortDirection -} - -input AppearanceWhere { - AND: [AppearanceWhere!] - NOT: AppearanceWhere - OR: [AppearanceWhere!] - "Return Appearances where all of the related AppearanceMoviesConnections match this filter" - moviesConnection_ALL: AppearanceMoviesConnectionWhere - "Return Appearances where none of the related AppearanceMoviesConnections match this filter" - moviesConnection_NONE: AppearanceMoviesConnectionWhere - "Return Appearances where one of the related AppearanceMoviesConnections match this filter" - moviesConnection_SINGLE: AppearanceMoviesConnectionWhere - "Return Appearances where some of the related AppearanceMoviesConnections match this filter" - moviesConnection_SOME: AppearanceMoviesConnectionWhere - "Return Appearances where all of the related Movies match this filter" - movies_ALL: MovieWhere - "Return Appearances where none of the related Movies match this filter" - movies_NONE: MovieWhere - "Return Appearances where one of the related Movies match this filter" - movies_SINGLE: MovieWhere - "Return Appearances where some of the related Movies match this filter" - movies_SOME: MovieWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -input MovieActorsActorConnectionWhere { - AND: [MovieActorsActorConnectionWhere!] - NOT: MovieActorsActorConnectionWhere - OR: [MovieActorsActorConnectionWhere!] - node: ActorWhere -} - -input MovieActorsAppearanceConnectionWhere { - AND: [MovieActorsAppearanceConnectionWhere!] - NOT: MovieActorsAppearanceConnectionWhere - OR: [MovieActorsAppearanceConnectionWhere!] - node: AppearanceWhere +input MovieActorsConnectionSort { + node: ActorSort } input MovieActorsConnectionWhere { - Actor: MovieActorsActorConnectionWhere - Appearance: MovieActorsAppearanceConnectionWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere } "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." @@ -1719,32 +1727,22 @@ input MovieWhere { actorsConnection_SINGLE: MovieActorsConnectionWhere "Return Movies where some of the related MovieActorsConnections match this filter" actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - title: String + "Return Movies where all of the related Actors match this filter" + actors_ALL: ActorWhere + "Return Movies where none of the related Actors match this filter" + actors_NONE: ActorWhere + "Return Movies where one of the related Actors match this filter" + actors_SINGLE: ActorWhere + "Return Movies where some of the related Actors match this filter" + actors_SOME: ActorWhere + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } -input PersonWhere { - Actor: ActorWhere - Appearance: AppearanceWhere -} - -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - ---- ==== enable only value filters @@ -1752,23 +1750,15 @@ input QueryOptions { .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { username: String! password: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } -type Appearance { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} - -union Person = Actor | Appearance - -type Movie { +type Movie @node { title: String - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable(byValue: true) + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) @filterable(byValue: true) } ---- @@ -1779,11 +1769,9 @@ schema { query: Query } -union Person = Actor | Appearance - type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! } @@ -1810,38 +1798,9 @@ type ActorsConnection { totalCount: Int! } -type Appearance { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! - password: String! - username: String! -} - -type AppearanceEdge { - cursor: String! - node: Appearance! -} - -type AppearanceMoviesConnection { - edges: [AppearanceMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type AppearanceMoviesRelationship { - cursor: String! - node: Movie! -} - -type AppearancesConnection { - edges: [AppearanceEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -1853,7 +1812,7 @@ type MovieActorsConnection { type MovieActorsRelationship { cursor: String! - node: Person! + node: Actor! } type MovieEdge { @@ -1876,13 +1835,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - appearances(options: AppearanceOptions, where: AppearanceWhere): [Appearance!]! - appearancesConnection(after: String, first: Int, sort: [AppearanceSort], where: AppearanceWhere): AppearancesConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -1904,13 +1860,6 @@ input ActorMoviesConnectionWhere { node: MovieWhere } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { password: SortDirection @@ -1937,98 +1886,257 @@ input ActorWhere { movies_SINGLE: MovieWhere "Return Actors where some of the related Movies match this filter" movies_SOME: MovieWhere - password: String + password: String @deprecated(reason : "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason : "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } -input AppearanceMoviesConnectionSort { - node: MovieSort +input MovieActorsConnectionSort { + node: ActorSort } -input AppearanceMoviesConnectionWhere { - AND: [AppearanceMoviesConnectionWhere!] - NOT: AppearanceMoviesConnectionWhere - OR: [AppearanceMoviesConnectionWhere!] - node: MovieWhere +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere } -input AppearanceOptions { - limit: Int - offset: Int - "Specify one or more AppearanceSort objects to sort Appearances by. The sorts will be applied in the order in which they are arranged in the array." - sort: [AppearanceSort!] +"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." +input MovieSort { + title: SortDirection } -"Fields to sort Appearances by. The order in which sorts are applied is not guaranteed when specifying many fields in one AppearanceSort object." -input AppearanceSort { - password: SortDirection - username: SortDirection +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + "Return Movies where all of the related MovieActorsConnections match this filter" + actorsConnection_ALL: MovieActorsConnectionWhere + "Return Movies where none of the related MovieActorsConnections match this filter" + actorsConnection_NONE: MovieActorsConnectionWhere + "Return Movies where one of the related MovieActorsConnections match this filter" + actorsConnection_SINGLE: MovieActorsConnectionWhere + "Return Movies where some of the related MovieActorsConnections match this filter" + actorsConnection_SOME: MovieActorsConnectionWhere + "Return Movies where all of the related Actors match this filter" + actors_ALL: ActorWhere + "Return Movies where none of the related Actors match this filter" + actors_NONE: ActorWhere + "Return Movies where one of the related Actors match this filter" + actors_SINGLE: ActorWhere + "Return Movies where some of the related Actors match this filter" + actors_SOME: ActorWhere + title: String @deprecated(reason : "Please use the explicit _EQ version") + title_CONTAINS: String + title_ENDS_WITH: String + title_EQ: String + title_IN: [String] + title_STARTS_WITH: String } -input AppearanceWhere { - AND: [AppearanceWhere!] - NOT: AppearanceWhere - OR: [AppearanceWhere!] - "Return Appearances where all of the related AppearanceMoviesConnections match this filter" - moviesConnection_ALL: AppearanceMoviesConnectionWhere - "Return Appearances where none of the related AppearanceMoviesConnections match this filter" - moviesConnection_NONE: AppearanceMoviesConnectionWhere - "Return Appearances where one of the related AppearanceMoviesConnections match this filter" - moviesConnection_SINGLE: AppearanceMoviesConnectionWhere - "Return Appearances where some of the related AppearanceMoviesConnections match this filter" - moviesConnection_SOME: AppearanceMoviesConnectionWhere - "Return Appearances where all of the related Movies match this filter" +---- + +=== on INTERFACE RELATIONSHIP FIELD, (aggregation does not exists on abstract types) + +==== default arguments should disable aggregation + +.Schema +[source,graphql,schema=true] +---- +type Actor implements Person @node { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) +} + +interface Person { + username: String! +} + +type Movie @node { + title: String + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable +} +---- + +.Augmented Schema +[source,graphql,augmented=true] +---- +schema { + query: Query +} + +interface Person { + username: String! +} + +type Actor implements Person { + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Movie { + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +"Pagination information (Relay)" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type PersonEdge { + cursor: String! + node: Person! +} + +type Query { + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! +} + +enum PersonImplementation { + Actor +} + +"An enum for sorting in either ascending or descending order." +enum SortDirection { + "Sort by field values in ascending order." + ASC + "Sort by field values in descending order." + DESC +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere +} + +"Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." +input ActorSort { + password: SortDirection + username: SortDirection +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + "Return Actors where all of the related ActorMoviesConnections match this filter" + moviesConnection_ALL: ActorMoviesConnectionWhere + "Return Actors where none of the related ActorMoviesConnections match this filter" + moviesConnection_NONE: ActorMoviesConnectionWhere + "Return Actors where one of the related ActorMoviesConnections match this filter" + moviesConnection_SINGLE: ActorMoviesConnectionWhere + "Return Actors where some of the related ActorMoviesConnections match this filter" + moviesConnection_SOME: ActorMoviesConnectionWhere + "Return Actors where all of the related Movies match this filter" movies_ALL: MovieWhere - "Return Appearances where none of the related Movies match this filter" + "Return Actors where none of the related Movies match this filter" movies_NONE: MovieWhere - "Return Appearances where one of the related Movies match this filter" + "Return Actors where one of the related Movies match this filter" movies_SINGLE: MovieWhere - "Return Appearances where some of the related Movies match this filter" + "Return Actors where some of the related Movies match this filter" movies_SOME: MovieWhere - password: String + password: String @deprecated(reason : "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason : "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } -input MovieActorsActorConnectionWhere { - AND: [MovieActorsActorConnectionWhere!] - NOT: MovieActorsActorConnectionWhere - OR: [MovieActorsActorConnectionWhere!] - node: ActorWhere -} - -input MovieActorsAppearanceConnectionWhere { - AND: [MovieActorsAppearanceConnectionWhere!] - NOT: MovieActorsAppearanceConnectionWhere - OR: [MovieActorsAppearanceConnectionWhere!] - node: AppearanceWhere +input MovieActorsConnectionSort { + node: PersonSort } input MovieActorsConnectionWhere { - Actor: MovieActorsActorConnectionWhere - Appearance: MovieActorsAppearanceConnectionWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere } "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." @@ -2056,22 +2164,1294 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } +"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." +input PersonSort { + username: SortDirection +} + input PersonWhere { - Actor: ActorWhere - Appearance: AppearanceWhere + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + typename: [PersonImplementation!] + username: String @deprecated(reason : "Please use the explicit _EQ version") + username_CONTAINS: String + username_ENDS_WITH: String + username_EQ: String + username_IN: [String!] + username_STARTS_WITH: String +} + +---- + +==== enable only value filters + +.Schema +[source,graphql,schema=true] +---- +type Actor implements Person @node { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) +} + +interface Person { + username: String! +} + +type Movie @node { + title: String + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable(byValue: true) +} +---- + +.Augmented Schema +[source,graphql,augmented=true] +---- +schema { + query: Query +} + +interface Person { + username: String! +} + +type Actor implements Person { + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! } -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Movie { + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +"Pagination information (Relay)" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type PersonEdge { + cursor: String! + node: Person! +} + +type Query { + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! +} + +enum PersonImplementation { + Actor +} + +"An enum for sorting in either ascending or descending order." +enum SortDirection { + "Sort by field values in ascending order." + ASC + "Sort by field values in descending order." + DESC +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere +} + +"Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." +input ActorSort { + password: SortDirection + username: SortDirection +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + "Return Actors where all of the related ActorMoviesConnections match this filter" + moviesConnection_ALL: ActorMoviesConnectionWhere + "Return Actors where none of the related ActorMoviesConnections match this filter" + moviesConnection_NONE: ActorMoviesConnectionWhere + "Return Actors where one of the related ActorMoviesConnections match this filter" + moviesConnection_SINGLE: ActorMoviesConnectionWhere + "Return Actors where some of the related ActorMoviesConnections match this filter" + moviesConnection_SOME: ActorMoviesConnectionWhere + "Return Actors where all of the related Movies match this filter" + movies_ALL: MovieWhere + "Return Actors where none of the related Movies match this filter" + movies_NONE: MovieWhere + "Return Actors where one of the related Movies match this filter" + movies_SINGLE: MovieWhere + "Return Actors where some of the related Movies match this filter" + movies_SOME: MovieWhere + password: String @deprecated(reason : "Please use the explicit _EQ version") + password_CONTAINS: String + password_ENDS_WITH: String + password_EQ: String + password_IN: [String!] + password_STARTS_WITH: String + username: String @deprecated(reason : "Please use the explicit _EQ version") + username_CONTAINS: String + username_ENDS_WITH: String + username_EQ: String + username_IN: [String!] + username_STARTS_WITH: String +} + +input MovieActorsConnectionSort { + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere +} + +"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." +input MovieSort { + title: SortDirection +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + "Return Movies where all of the related MovieActorsConnections match this filter" + actorsConnection_ALL: MovieActorsConnectionWhere + "Return Movies where none of the related MovieActorsConnections match this filter" + actorsConnection_NONE: MovieActorsConnectionWhere + "Return Movies where one of the related MovieActorsConnections match this filter" + actorsConnection_SINGLE: MovieActorsConnectionWhere + "Return Movies where some of the related MovieActorsConnections match this filter" + actorsConnection_SOME: MovieActorsConnectionWhere + "Return Movies where all of the related People match this filter" + actors_ALL: PersonWhere + "Return Movies where none of the related People match this filter" + actors_NONE: PersonWhere + "Return Movies where one of the related People match this filter" + actors_SINGLE: PersonWhere + "Return Movies where some of the related People match this filter" + actors_SOME: PersonWhere + title: String @deprecated(reason : "Please use the explicit _EQ version") + title_CONTAINS: String + title_ENDS_WITH: String + title_EQ: String + title_IN: [String] + title_STARTS_WITH: String +} + +"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." +input PersonSort { + username: SortDirection +} + +input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + typename: [PersonImplementation!] + username: String @deprecated(reason : "Please use the explicit _EQ version") + username_CONTAINS: String + username_ENDS_WITH: String + username_EQ: String + username_IN: [String!] + username_STARTS_WITH: String +} + +---- + +=== on UNION RELATIONSHIP FIELD, (aggregation does not exists on abstract types) + +==== default arguments should disable aggregation + +.Schema +[source,graphql,schema=true] +---- +type Actor @node { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) +} + +type Appearance @node { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) +} + +union Person = Actor | Appearance + +type Movie @node { + title: String + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable +} +---- + +.Augmented Schema +[source,graphql,augmented=true] +---- +schema { + query: Query +} + +union Person = Actor | Appearance + +type Actor { + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Appearance { + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! + password: String! + username: String! +} + +type AppearanceEdge { + cursor: String! + node: Appearance! +} + +type AppearanceMoviesConnection { + edges: [AppearanceMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type AppearanceMoviesRelationship { + cursor: String! + node: Movie! +} + +type AppearancesConnection { + edges: [AppearanceEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Movie { + actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +"Pagination information (Relay)" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + appearances(limit: Int, offset: Int, sort: [AppearanceSort!], where: AppearanceWhere): [Appearance!]! + appearancesConnection(after: String, first: Int, sort: [AppearanceSort!], where: AppearanceWhere): AppearancesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, where: PersonWhere): [Person!]! +} + +"An enum for sorting in either ascending or descending order." +enum SortDirection { + "Sort by field values in ascending order." + ASC + "Sort by field values in descending order." + DESC +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere +} + +"Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." +input ActorSort { + password: SortDirection + username: SortDirection +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + "Return Actors where all of the related ActorMoviesConnections match this filter" + moviesConnection_ALL: ActorMoviesConnectionWhere + "Return Actors where none of the related ActorMoviesConnections match this filter" + moviesConnection_NONE: ActorMoviesConnectionWhere + "Return Actors where one of the related ActorMoviesConnections match this filter" + moviesConnection_SINGLE: ActorMoviesConnectionWhere + "Return Actors where some of the related ActorMoviesConnections match this filter" + moviesConnection_SOME: ActorMoviesConnectionWhere + "Return Actors where all of the related Movies match this filter" + movies_ALL: MovieWhere + "Return Actors where none of the related Movies match this filter" + movies_NONE: MovieWhere + "Return Actors where one of the related Movies match this filter" + movies_SINGLE: MovieWhere + "Return Actors where some of the related Movies match this filter" + movies_SOME: MovieWhere + password: String @deprecated(reason : "Please use the explicit _EQ version") + password_CONTAINS: String + password_ENDS_WITH: String + password_EQ: String + password_IN: [String!] + password_STARTS_WITH: String + username: String @deprecated(reason : "Please use the explicit _EQ version") + username_CONTAINS: String + username_ENDS_WITH: String + username_EQ: String + username_IN: [String!] + username_STARTS_WITH: String +} + +input AppearanceMoviesConnectionSort { + node: MovieSort +} + +input AppearanceMoviesConnectionWhere { + AND: [AppearanceMoviesConnectionWhere!] + NOT: AppearanceMoviesConnectionWhere + OR: [AppearanceMoviesConnectionWhere!] + node: MovieWhere +} + +"Fields to sort Appearances by. The order in which sorts are applied is not guaranteed when specifying many fields in one AppearanceSort object." +input AppearanceSort { + password: SortDirection + username: SortDirection +} + +input AppearanceWhere { + AND: [AppearanceWhere!] + NOT: AppearanceWhere + OR: [AppearanceWhere!] + "Return Appearances where all of the related AppearanceMoviesConnections match this filter" + moviesConnection_ALL: AppearanceMoviesConnectionWhere + "Return Appearances where none of the related AppearanceMoviesConnections match this filter" + moviesConnection_NONE: AppearanceMoviesConnectionWhere + "Return Appearances where one of the related AppearanceMoviesConnections match this filter" + moviesConnection_SINGLE: AppearanceMoviesConnectionWhere + "Return Appearances where some of the related AppearanceMoviesConnections match this filter" + moviesConnection_SOME: AppearanceMoviesConnectionWhere + "Return Appearances where all of the related Movies match this filter" + movies_ALL: MovieWhere + "Return Appearances where none of the related Movies match this filter" + movies_NONE: MovieWhere + "Return Appearances where one of the related Movies match this filter" + movies_SINGLE: MovieWhere + "Return Appearances where some of the related Movies match this filter" + movies_SOME: MovieWhere + password: String @deprecated(reason : "Please use the explicit _EQ version") + password_CONTAINS: String + password_ENDS_WITH: String + password_EQ: String + password_IN: [String!] + password_STARTS_WITH: String + username: String @deprecated(reason : "Please use the explicit _EQ version") + username_CONTAINS: String + username_ENDS_WITH: String + username_EQ: String + username_IN: [String!] + username_STARTS_WITH: String +} + +input MovieActorsActorConnectionWhere { + AND: [MovieActorsActorConnectionWhere!] + NOT: MovieActorsActorConnectionWhere + OR: [MovieActorsActorConnectionWhere!] + node: ActorWhere +} + +input MovieActorsAppearanceConnectionWhere { + AND: [MovieActorsAppearanceConnectionWhere!] + NOT: MovieActorsAppearanceConnectionWhere + OR: [MovieActorsAppearanceConnectionWhere!] + node: AppearanceWhere +} + +input MovieActorsConnectionWhere { + Actor: MovieActorsActorConnectionWhere + Appearance: MovieActorsAppearanceConnectionWhere +} + +"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." +input MovieSort { + title: SortDirection +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + "Return Movies where all of the related MovieActorsConnections match this filter" + actorsConnection_ALL: MovieActorsConnectionWhere + "Return Movies where none of the related MovieActorsConnections match this filter" + actorsConnection_NONE: MovieActorsConnectionWhere + "Return Movies where one of the related MovieActorsConnections match this filter" + actorsConnection_SINGLE: MovieActorsConnectionWhere + "Return Movies where some of the related MovieActorsConnections match this filter" + actorsConnection_SOME: MovieActorsConnectionWhere + "Return Movies where all of the related People match this filter" + actors_ALL: PersonWhere + "Return Movies where none of the related People match this filter" + actors_NONE: PersonWhere + "Return Movies where one of the related People match this filter" + actors_SINGLE: PersonWhere + "Return Movies where some of the related People match this filter" + actors_SOME: PersonWhere + title: String @deprecated(reason : "Please use the explicit _EQ version") + title_CONTAINS: String + title_ENDS_WITH: String + title_EQ: String + title_IN: [String] + title_STARTS_WITH: String +} + +input PersonWhere { + Actor: ActorWhere + Appearance: AppearanceWhere +} + +---- + +==== enable only value filters + +.Schema +[source,graphql,schema=true] +---- +type Actor @node { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) +} + +type Appearance @node { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) +} + +union Person = Actor | Appearance + +type Movie @node { + title: String + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable(byValue: true) +} +---- + +.Augmented Schema +[source,graphql,augmented=true] +---- +schema { + query: Query +} + +union Person = Actor | Appearance + +type Actor { + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Appearance { + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! + password: String! + username: String! +} + +type AppearanceEdge { + cursor: String! + node: Appearance! +} + +type AppearanceMoviesConnection { + edges: [AppearanceMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type AppearanceMoviesRelationship { + cursor: String! + node: Movie! +} + +type AppearancesConnection { + edges: [AppearanceEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Movie { + actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +"Pagination information (Relay)" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + appearances(limit: Int, offset: Int, sort: [AppearanceSort!], where: AppearanceWhere): [Appearance!]! + appearancesConnection(after: String, first: Int, sort: [AppearanceSort!], where: AppearanceWhere): AppearancesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, where: PersonWhere): [Person!]! +} + +"An enum for sorting in either ascending or descending order." +enum SortDirection { + "Sort by field values in ascending order." + ASC + "Sort by field values in descending order." + DESC +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere +} + +"Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." +input ActorSort { + password: SortDirection + username: SortDirection +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + "Return Actors where all of the related ActorMoviesConnections match this filter" + moviesConnection_ALL: ActorMoviesConnectionWhere + "Return Actors where none of the related ActorMoviesConnections match this filter" + moviesConnection_NONE: ActorMoviesConnectionWhere + "Return Actors where one of the related ActorMoviesConnections match this filter" + moviesConnection_SINGLE: ActorMoviesConnectionWhere + "Return Actors where some of the related ActorMoviesConnections match this filter" + moviesConnection_SOME: ActorMoviesConnectionWhere + "Return Actors where all of the related Movies match this filter" + movies_ALL: MovieWhere + "Return Actors where none of the related Movies match this filter" + movies_NONE: MovieWhere + "Return Actors where one of the related Movies match this filter" + movies_SINGLE: MovieWhere + "Return Actors where some of the related Movies match this filter" + movies_SOME: MovieWhere + password: String @deprecated(reason : "Please use the explicit _EQ version") + password_CONTAINS: String + password_ENDS_WITH: String + password_EQ: String + password_IN: [String!] + password_STARTS_WITH: String + username: String @deprecated(reason : "Please use the explicit _EQ version") + username_CONTAINS: String + username_ENDS_WITH: String + username_EQ: String + username_IN: [String!] + username_STARTS_WITH: String +} + +input AppearanceMoviesConnectionSort { + node: MovieSort +} + +input AppearanceMoviesConnectionWhere { + AND: [AppearanceMoviesConnectionWhere!] + NOT: AppearanceMoviesConnectionWhere + OR: [AppearanceMoviesConnectionWhere!] + node: MovieWhere +} + +"Fields to sort Appearances by. The order in which sorts are applied is not guaranteed when specifying many fields in one AppearanceSort object." +input AppearanceSort { + password: SortDirection + username: SortDirection +} + +input AppearanceWhere { + AND: [AppearanceWhere!] + NOT: AppearanceWhere + OR: [AppearanceWhere!] + "Return Appearances where all of the related AppearanceMoviesConnections match this filter" + moviesConnection_ALL: AppearanceMoviesConnectionWhere + "Return Appearances where none of the related AppearanceMoviesConnections match this filter" + moviesConnection_NONE: AppearanceMoviesConnectionWhere + "Return Appearances where one of the related AppearanceMoviesConnections match this filter" + moviesConnection_SINGLE: AppearanceMoviesConnectionWhere + "Return Appearances where some of the related AppearanceMoviesConnections match this filter" + moviesConnection_SOME: AppearanceMoviesConnectionWhere + "Return Appearances where all of the related Movies match this filter" + movies_ALL: MovieWhere + "Return Appearances where none of the related Movies match this filter" + movies_NONE: MovieWhere + "Return Appearances where one of the related Movies match this filter" + movies_SINGLE: MovieWhere + "Return Appearances where some of the related Movies match this filter" + movies_SOME: MovieWhere + password: String @deprecated(reason : "Please use the explicit _EQ version") + password_CONTAINS: String + password_ENDS_WITH: String + password_EQ: String + password_IN: [String!] + password_STARTS_WITH: String + username: String @deprecated(reason : "Please use the explicit _EQ version") + username_CONTAINS: String + username_ENDS_WITH: String + username_EQ: String + username_IN: [String!] + username_STARTS_WITH: String +} + +input MovieActorsActorConnectionWhere { + AND: [MovieActorsActorConnectionWhere!] + NOT: MovieActorsActorConnectionWhere + OR: [MovieActorsActorConnectionWhere!] + node: ActorWhere +} + +input MovieActorsAppearanceConnectionWhere { + AND: [MovieActorsAppearanceConnectionWhere!] + NOT: MovieActorsAppearanceConnectionWhere + OR: [MovieActorsAppearanceConnectionWhere!] + node: AppearanceWhere +} + +input MovieActorsConnectionWhere { + Actor: MovieActorsActorConnectionWhere + Appearance: MovieActorsAppearanceConnectionWhere +} + +"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." +input MovieSort { + title: SortDirection +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + "Return Movies where all of the related MovieActorsConnections match this filter" + actorsConnection_ALL: MovieActorsConnectionWhere + "Return Movies where none of the related MovieActorsConnections match this filter" + actorsConnection_NONE: MovieActorsConnectionWhere + "Return Movies where one of the related MovieActorsConnections match this filter" + actorsConnection_SINGLE: MovieActorsConnectionWhere + "Return Movies where some of the related MovieActorsConnections match this filter" + actorsConnection_SOME: MovieActorsConnectionWhere + "Return Movies where all of the related People match this filter" + actors_ALL: PersonWhere + "Return Movies where none of the related People match this filter" + actors_NONE: PersonWhere + "Return Movies where one of the related People match this filter" + actors_SINGLE: PersonWhere + "Return Movies where some of the related People match this filter" + actors_SOME: PersonWhere + title: String @deprecated(reason : "Please use the explicit _EQ version") + title_CONTAINS: String + title_ENDS_WITH: String + title_EQ: String + title_IN: [String] + title_STARTS_WITH: String +} + +input PersonWhere { + Actor: ActorWhere + Appearance: AppearanceWhere +} + +---- + +== on RELATIONSHIP FIELD + +=== default arguments should disable aggregation + +.Schema +[source,graphql,schema=true] +---- +type Actor @node { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) +} + +type Movie @node { + title: String + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) @filterable +} +---- + +.Augmented Schema +[source,graphql,augmented=true] +---- +schema { + query: Query +} + +type Actor { + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Movie { + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type MovieActorsRelationship { + cursor: String! + node: Actor! +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +"Pagination information (Relay)" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! +} + +"An enum for sorting in either ascending or descending order." +enum SortDirection { + "Sort by field values in ascending order." + ASC + "Sort by field values in descending order." + DESC +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere +} + +"Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." +input ActorSort { + password: SortDirection + username: SortDirection +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + "Return Actors where all of the related ActorMoviesConnections match this filter" + moviesConnection_ALL: ActorMoviesConnectionWhere + "Return Actors where none of the related ActorMoviesConnections match this filter" + moviesConnection_NONE: ActorMoviesConnectionWhere + "Return Actors where one of the related ActorMoviesConnections match this filter" + moviesConnection_SINGLE: ActorMoviesConnectionWhere + "Return Actors where some of the related ActorMoviesConnections match this filter" + moviesConnection_SOME: ActorMoviesConnectionWhere + "Return Actors where all of the related Movies match this filter" + movies_ALL: MovieWhere + "Return Actors where none of the related Movies match this filter" + movies_NONE: MovieWhere + "Return Actors where one of the related Movies match this filter" + movies_SINGLE: MovieWhere + "Return Actors where some of the related Movies match this filter" + movies_SOME: MovieWhere + password: String @deprecated(reason : "Please use the explicit _EQ version") + password_CONTAINS: String + password_ENDS_WITH: String + password_EQ: String + password_IN: [String!] + password_STARTS_WITH: String + username: String @deprecated(reason : "Please use the explicit _EQ version") + username_CONTAINS: String + username_ENDS_WITH: String + username_EQ: String + username_IN: [String!] + username_STARTS_WITH: String +} + +input MovieActorsConnectionSort { + node: ActorSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere +} + +"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." +input MovieSort { + title: SortDirection +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + "Return Movies where all of the related MovieActorsConnections match this filter" + actorsConnection_ALL: MovieActorsConnectionWhere + "Return Movies where none of the related MovieActorsConnections match this filter" + actorsConnection_NONE: MovieActorsConnectionWhere + "Return Movies where one of the related MovieActorsConnections match this filter" + actorsConnection_SINGLE: MovieActorsConnectionWhere + "Return Movies where some of the related MovieActorsConnections match this filter" + actorsConnection_SOME: MovieActorsConnectionWhere + "Return Movies where all of the related Actors match this filter" + actors_ALL: ActorWhere + "Return Movies where none of the related Actors match this filter" + actors_NONE: ActorWhere + "Return Movies where one of the related Actors match this filter" + actors_SINGLE: ActorWhere + "Return Movies where some of the related Actors match this filter" + actors_SOME: ActorWhere + title: String @deprecated(reason : "Please use the explicit _EQ version") + title_CONTAINS: String + title_ENDS_WITH: String + title_EQ: String + title_IN: [String] + title_STARTS_WITH: String +} + +---- + +=== enable only value filters + +.Schema +[source,graphql,schema=true] +---- +type Actor @node { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) +} + +type Movie @node { + title: String + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) @filterable(byValue: true) +} +---- + +.Augmented Schema +[source,graphql,augmented=true] +---- +schema { + query: Query +} + +type Actor { + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Movie { + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type MovieActorsRelationship { + cursor: String! + node: Actor! +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +"Pagination information (Relay)" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! +} + +"An enum for sorting in either ascending or descending order." +enum SortDirection { + "Sort by field values in ascending order." + ASC + "Sort by field values in descending order." + DESC +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere +} + +"Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." +input ActorSort { + password: SortDirection + username: SortDirection +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + "Return Actors where all of the related ActorMoviesConnections match this filter" + moviesConnection_ALL: ActorMoviesConnectionWhere + "Return Actors where none of the related ActorMoviesConnections match this filter" + moviesConnection_NONE: ActorMoviesConnectionWhere + "Return Actors where one of the related ActorMoviesConnections match this filter" + moviesConnection_SINGLE: ActorMoviesConnectionWhere + "Return Actors where some of the related ActorMoviesConnections match this filter" + moviesConnection_SOME: ActorMoviesConnectionWhere + "Return Actors where all of the related Movies match this filter" + movies_ALL: MovieWhere + "Return Actors where none of the related Movies match this filter" + movies_NONE: MovieWhere + "Return Actors where one of the related Movies match this filter" + movies_SINGLE: MovieWhere + "Return Actors where some of the related Movies match this filter" + movies_SOME: MovieWhere + password: String @deprecated(reason : "Please use the explicit _EQ version") + password_CONTAINS: String + password_ENDS_WITH: String + password_EQ: String + password_IN: [String!] + password_STARTS_WITH: String + username: String @deprecated(reason : "Please use the explicit _EQ version") + username_CONTAINS: String + username_ENDS_WITH: String + username_EQ: String + username_IN: [String!] + username_STARTS_WITH: String +} + +input MovieActorsConnectionSort { + node: ActorSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere +} + +"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." +input MovieSort { + title: SortDirection +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + "Return Movies where all of the related MovieActorsConnections match this filter" + actorsConnection_ALL: MovieActorsConnectionWhere + "Return Movies where none of the related MovieActorsConnections match this filter" + actorsConnection_NONE: MovieActorsConnectionWhere + "Return Movies where one of the related MovieActorsConnections match this filter" + actorsConnection_SINGLE: MovieActorsConnectionWhere + "Return Movies where some of the related MovieActorsConnections match this filter" + actorsConnection_SOME: MovieActorsConnectionWhere + "Return Movies where all of the related Actors match this filter" + actors_ALL: ActorWhere + "Return Movies where none of the related Actors match this filter" + actors_NONE: ActorWhere + "Return Movies where one of the related Actors match this filter" + actors_SINGLE: ActorWhere + "Return Movies where some of the related Actors match this filter" + actors_SOME: ActorWhere + title: String @deprecated(reason : "Please use the explicit _EQ version") + title_CONTAINS: String + title_ENDS_WITH: String + title_EQ: String + title_IN: [String] + title_STARTS_WITH: String } ---- diff --git a/core/src/test/resources/tck-test-files/schema/v2/directives/filterable.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/directives/filterable.js.adoc index d19062ef..02ea618b 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/directives/filterable.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/directives/filterable.js.adoc @@ -4,26 +4,242 @@ = @filterable directive -== on INTERFACE RELATIONSHIP FIELD, (aggregation are not generated for abstract types) +== on RELATIONSHIP FIELD -=== disable value filters +=== default arguments should disable aggregation .Schema [source,graphql,schema=true] ---- -type Actor implements Person { +type Actor @node { username: String! password: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } -interface Person { +type Movie @node { + title: String + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) @filterable +} +---- + +.Augmented Schema +[source,graphql,augmented=true] +---- +schema { + query: Query +} + +type Actor { + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! username: String! } +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +""" +Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. +""" +input ActorSort { + password: SortDirection + username: SortDirection +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + """ + Return Actors where all of the related ActorMoviesConnections match this filter + """ + moviesConnection_ALL: ActorMoviesConnectionWhere + """ + Return Actors where none of the related ActorMoviesConnections match this filter + """ + moviesConnection_NONE: ActorMoviesConnectionWhere + """ + Return Actors where one of the related ActorMoviesConnections match this filter + """ + moviesConnection_SINGLE: ActorMoviesConnectionWhere + """ + Return Actors where some of the related ActorMoviesConnections match this filter + """ + moviesConnection_SOME: ActorMoviesConnectionWhere + """Return Actors where all of the related Movies match this filter""" + movies_ALL: MovieWhere + """Return Actors where none of the related Movies match this filter""" + movies_NONE: MovieWhere + """Return Actors where one of the related Movies match this filter""" + movies_SINGLE: MovieWhere + """Return Actors where some of the related Movies match this filter""" + movies_SOME: MovieWhere + password: String @deprecated(reason: "Please use the explicit _EQ version") + password_CONTAINS: String + password_ENDS_WITH: String + password_EQ: String + password_IN: [String!] + password_STARTS_WITH: String + username: String @deprecated(reason: "Please use the explicit _EQ version") + username_CONTAINS: String + username_ENDS_WITH: String + username_EQ: String + username_IN: [String!] + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + type Movie { + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable(byValue: false) +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: ActorSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere +} + +type MovieActorsRelationship { + cursor: String! + node: Actor! +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +""" +Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. +""" +input MovieSort { + title: SortDirection +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + """ + Return Movies where all of the related MovieActorsConnections match this filter + """ + actorsConnection_ALL: MovieActorsConnectionWhere + """ + Return Movies where none of the related MovieActorsConnections match this filter + """ + actorsConnection_NONE: MovieActorsConnectionWhere + """ + Return Movies where one of the related MovieActorsConnections match this filter + """ + actorsConnection_SINGLE: MovieActorsConnectionWhere + """ + Return Movies where some of the related MovieActorsConnections match this filter + """ + actorsConnection_SOME: MovieActorsConnectionWhere + """Return Movies where all of the related Actors match this filter""" + actors_ALL: ActorWhere + """Return Movies where none of the related Actors match this filter""" + actors_NONE: ActorWhere + """Return Movies where one of the related Actors match this filter""" + actors_SINGLE: ActorWhere + """Return Movies where some of the related Actors match this filter""" + actors_SOME: ActorWhere + title: String @deprecated(reason: "Please use the explicit _EQ version") + title_CONTAINS: String + title_ENDS_WITH: String + title_EQ: String + title_IN: [String] + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +"""Pagination information (Relay)""" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! +} + +"""An enum for sorting in either ascending or descending order.""" +enum SortDirection { + """Sort by field values in ascending order.""" + ASC + """Sort by field values in descending order.""" + DESC +} +---- + +=== enable only value filters + +.Schema +[source,graphql,schema=true] +---- +type Actor @node { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) +} + +type Movie @node { + title: String + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) @filterable(byValue: true) } ---- @@ -34,124 +250,1554 @@ schema { query: Query } -type Actor implements Person { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! +type Actor { + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +""" +Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. +""" +input ActorSort { + password: SortDirection + username: SortDirection +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + """ + Return Actors where all of the related ActorMoviesConnections match this filter + """ + moviesConnection_ALL: ActorMoviesConnectionWhere + """ + Return Actors where none of the related ActorMoviesConnections match this filter + """ + moviesConnection_NONE: ActorMoviesConnectionWhere + """ + Return Actors where one of the related ActorMoviesConnections match this filter + """ + moviesConnection_SINGLE: ActorMoviesConnectionWhere + """ + Return Actors where some of the related ActorMoviesConnections match this filter + """ + moviesConnection_SOME: ActorMoviesConnectionWhere + """Return Actors where all of the related Movies match this filter""" + movies_ALL: MovieWhere + """Return Actors where none of the related Movies match this filter""" + movies_NONE: MovieWhere + """Return Actors where one of the related Movies match this filter""" + movies_SINGLE: MovieWhere + """Return Actors where some of the related Movies match this filter""" + movies_SOME: MovieWhere + password: String @deprecated(reason: "Please use the explicit _EQ version") + password_CONTAINS: String + password_ENDS_WITH: String + password_EQ: String + password_IN: [String!] + password_STARTS_WITH: String + username: String @deprecated(reason: "Please use the explicit _EQ version") + username_CONTAINS: String + username_ENDS_WITH: String + username_EQ: String + username_IN: [String!] + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Movie { + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: ActorSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere +} + +type MovieActorsRelationship { + cursor: String! + node: Actor! +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +""" +Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. +""" +input MovieSort { + title: SortDirection +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + """ + Return Movies where all of the related MovieActorsConnections match this filter + """ + actorsConnection_ALL: MovieActorsConnectionWhere + """ + Return Movies where none of the related MovieActorsConnections match this filter + """ + actorsConnection_NONE: MovieActorsConnectionWhere + """ + Return Movies where one of the related MovieActorsConnections match this filter + """ + actorsConnection_SINGLE: MovieActorsConnectionWhere + """ + Return Movies where some of the related MovieActorsConnections match this filter + """ + actorsConnection_SOME: MovieActorsConnectionWhere + """Return Movies where all of the related Actors match this filter""" + actors_ALL: ActorWhere + """Return Movies where none of the related Actors match this filter""" + actors_NONE: ActorWhere + """Return Movies where one of the related Actors match this filter""" + actors_SINGLE: ActorWhere + """Return Movies where some of the related Actors match this filter""" + actors_SOME: ActorWhere + title: String @deprecated(reason: "Please use the explicit _EQ version") + title_CONTAINS: String + title_ENDS_WITH: String + title_EQ: String + title_IN: [String] + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +"""Pagination information (Relay)""" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! +} + +"""An enum for sorting in either ascending or descending order.""" +enum SortDirection { + """Sort by field values in ascending order.""" + ASC + """Sort by field values in descending order.""" + DESC +} +---- + +== on INTERFACE RELATIONSHIP FIELD, (aggregation are not generated for abstract types) + +=== default arguments should disable aggregation + +.Schema +[source,graphql,schema=true] +---- +type Actor implements Person @node { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) +} + +interface Person { + username: String! +} + +type Movie @node { + title: String + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable +} +---- + +.Augmented Schema +[source,graphql,augmented=true] +---- +schema { + query: Query +} + +type Actor implements Person { + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +""" +Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. +""" +input ActorSort { + password: SortDirection + username: SortDirection +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + """ + Return Actors where all of the related ActorMoviesConnections match this filter + """ + moviesConnection_ALL: ActorMoviesConnectionWhere + """ + Return Actors where none of the related ActorMoviesConnections match this filter + """ + moviesConnection_NONE: ActorMoviesConnectionWhere + """ + Return Actors where one of the related ActorMoviesConnections match this filter + """ + moviesConnection_SINGLE: ActorMoviesConnectionWhere + """ + Return Actors where some of the related ActorMoviesConnections match this filter + """ + moviesConnection_SOME: ActorMoviesConnectionWhere + """Return Actors where all of the related Movies match this filter""" + movies_ALL: MovieWhere + """Return Actors where none of the related Movies match this filter""" + movies_NONE: MovieWhere + """Return Actors where one of the related Movies match this filter""" + movies_SINGLE: MovieWhere + """Return Actors where some of the related Movies match this filter""" + movies_SOME: MovieWhere + password: String @deprecated(reason: "Please use the explicit _EQ version") + password_CONTAINS: String + password_ENDS_WITH: String + password_EQ: String + password_IN: [String!] + password_STARTS_WITH: String + username: String @deprecated(reason: "Please use the explicit _EQ version") + username_CONTAINS: String + username_ENDS_WITH: String + username_EQ: String + username_IN: [String!] + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Movie { + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +""" +Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. +""" +input MovieSort { + title: SortDirection +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + """ + Return Movies where all of the related MovieActorsConnections match this filter + """ + actorsConnection_ALL: MovieActorsConnectionWhere + """ + Return Movies where none of the related MovieActorsConnections match this filter + """ + actorsConnection_NONE: MovieActorsConnectionWhere + """ + Return Movies where one of the related MovieActorsConnections match this filter + """ + actorsConnection_SINGLE: MovieActorsConnectionWhere + """ + Return Movies where some of the related MovieActorsConnections match this filter + """ + actorsConnection_SOME: MovieActorsConnectionWhere + """Return Movies where all of the related People match this filter""" + actors_ALL: PersonWhere + """Return Movies where none of the related People match this filter""" + actors_NONE: PersonWhere + """Return Movies where one of the related People match this filter""" + actors_SINGLE: PersonWhere + """Return Movies where some of the related People match this filter""" + actors_SOME: PersonWhere + title: String @deprecated(reason: "Please use the explicit _EQ version") + title_CONTAINS: String + title_ENDS_WITH: String + title_EQ: String + title_IN: [String] + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +"""Pagination information (Relay)""" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +interface Person { + username: String! +} + +type PersonEdge { + cursor: String! + node: Person! +} + +enum PersonImplementation { + Actor +} + +""" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +""" +input PersonSort { + username: SortDirection +} + +input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + typename: [PersonImplementation!] + username: String @deprecated(reason: "Please use the explicit _EQ version") + username_CONTAINS: String + username_ENDS_WITH: String + username_EQ: String + username_IN: [String!] + username_STARTS_WITH: String +} + +type Query { + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! +} + +"""An enum for sorting in either ascending or descending order.""" +enum SortDirection { + """Sort by field values in ascending order.""" + ASC + """Sort by field values in descending order.""" + DESC +} +---- + +=== enable only value filters + +.Schema +[source,graphql,schema=true] +---- +type Actor implements Person @node { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) +} + +interface Person { + username: String! +} + +type Movie @node { + title: String + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable(byValue: true) +} +---- + +.Augmented Schema +[source,graphql,augmented=true] +---- +schema { + query: Query +} + +type Actor implements Person { + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +""" +Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. +""" +input ActorSort { + password: SortDirection + username: SortDirection +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + """ + Return Actors where all of the related ActorMoviesConnections match this filter + """ + moviesConnection_ALL: ActorMoviesConnectionWhere + """ + Return Actors where none of the related ActorMoviesConnections match this filter + """ + moviesConnection_NONE: ActorMoviesConnectionWhere + """ + Return Actors where one of the related ActorMoviesConnections match this filter + """ + moviesConnection_SINGLE: ActorMoviesConnectionWhere + """ + Return Actors where some of the related ActorMoviesConnections match this filter + """ + moviesConnection_SOME: ActorMoviesConnectionWhere + """Return Actors where all of the related Movies match this filter""" + movies_ALL: MovieWhere + """Return Actors where none of the related Movies match this filter""" + movies_NONE: MovieWhere + """Return Actors where one of the related Movies match this filter""" + movies_SINGLE: MovieWhere + """Return Actors where some of the related Movies match this filter""" + movies_SOME: MovieWhere + password: String @deprecated(reason: "Please use the explicit _EQ version") + password_CONTAINS: String + password_ENDS_WITH: String + password_EQ: String + password_IN: [String!] + password_STARTS_WITH: String + username: String @deprecated(reason: "Please use the explicit _EQ version") + username_CONTAINS: String + username_ENDS_WITH: String + username_EQ: String + username_IN: [String!] + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Movie { + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +""" +Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. +""" +input MovieSort { + title: SortDirection +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + """ + Return Movies where all of the related MovieActorsConnections match this filter + """ + actorsConnection_ALL: MovieActorsConnectionWhere + """ + Return Movies where none of the related MovieActorsConnections match this filter + """ + actorsConnection_NONE: MovieActorsConnectionWhere + """ + Return Movies where one of the related MovieActorsConnections match this filter + """ + actorsConnection_SINGLE: MovieActorsConnectionWhere + """ + Return Movies where some of the related MovieActorsConnections match this filter + """ + actorsConnection_SOME: MovieActorsConnectionWhere + """Return Movies where all of the related People match this filter""" + actors_ALL: PersonWhere + """Return Movies where none of the related People match this filter""" + actors_NONE: PersonWhere + """Return Movies where one of the related People match this filter""" + actors_SINGLE: PersonWhere + """Return Movies where some of the related People match this filter""" + actors_SOME: PersonWhere + title: String @deprecated(reason: "Please use the explicit _EQ version") + title_CONTAINS: String + title_ENDS_WITH: String + title_EQ: String + title_IN: [String] + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +"""Pagination information (Relay)""" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +interface Person { + username: String! +} + +type PersonEdge { + cursor: String! + node: Person! +} + +enum PersonImplementation { + Actor +} + +""" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +""" +input PersonSort { + username: SortDirection +} + +input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + typename: [PersonImplementation!] + username: String @deprecated(reason: "Please use the explicit _EQ version") + username_CONTAINS: String + username_ENDS_WITH: String + username_EQ: String + username_IN: [String!] + username_STARTS_WITH: String +} + +type Query { + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! +} + +"""An enum for sorting in either ascending or descending order.""" +enum SortDirection { + """Sort by field values in ascending order.""" + ASC + """Sort by field values in descending order.""" + DESC +} +---- + +=== disable value filters + +.Schema +[source,graphql,schema=true] +---- +type Actor implements Person @node { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) +} + +interface Person { + username: String! +} + +type Movie @node { + title: String + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable(byValue: false) +} +---- + +.Augmented Schema +[source,graphql,augmented=true] +---- +schema { + query: Query +} + +type Actor implements Person { + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +""" +Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. +""" +input ActorSort { + password: SortDirection + username: SortDirection +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + """ + Return Actors where all of the related ActorMoviesConnections match this filter + """ + moviesConnection_ALL: ActorMoviesConnectionWhere + """ + Return Actors where none of the related ActorMoviesConnections match this filter + """ + moviesConnection_NONE: ActorMoviesConnectionWhere + """ + Return Actors where one of the related ActorMoviesConnections match this filter + """ + moviesConnection_SINGLE: ActorMoviesConnectionWhere + """ + Return Actors where some of the related ActorMoviesConnections match this filter + """ + moviesConnection_SOME: ActorMoviesConnectionWhere + """Return Actors where all of the related Movies match this filter""" + movies_ALL: MovieWhere + """Return Actors where none of the related Movies match this filter""" + movies_NONE: MovieWhere + """Return Actors where one of the related Movies match this filter""" + movies_SINGLE: MovieWhere + """Return Actors where some of the related Movies match this filter""" + movies_SOME: MovieWhere + password: String @deprecated(reason: "Please use the explicit _EQ version") + password_CONTAINS: String + password_ENDS_WITH: String + password_EQ: String + password_IN: [String!] + password_STARTS_WITH: String + username: String @deprecated(reason: "Please use the explicit _EQ version") + username_CONTAINS: String + username_ENDS_WITH: String + username_EQ: String + username_IN: [String!] + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Movie { + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +""" +Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. +""" +input MovieSort { + title: SortDirection +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + title: String @deprecated(reason: "Please use the explicit _EQ version") + title_CONTAINS: String + title_ENDS_WITH: String + title_EQ: String + title_IN: [String] + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +"""Pagination information (Relay)""" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +interface Person { + username: String! +} + +type PersonEdge { + cursor: String! + node: Person! +} + +enum PersonImplementation { + Actor +} + +""" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +""" +input PersonSort { + username: SortDirection +} + +input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + typename: [PersonImplementation!] + username: String @deprecated(reason: "Please use the explicit _EQ version") + username_CONTAINS: String + username_ENDS_WITH: String + username_EQ: String + username_IN: [String!] + username_STARTS_WITH: String +} + +type Query { + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! +} + +"""An enum for sorting in either ascending or descending order.""" +enum SortDirection { + """Sort by field values in ascending order.""" + ASC + """Sort by field values in descending order.""" + DESC +} +---- + +== on UNION RELATIONSHIP FIELD, (aggregation are no generated for abstract types) + +=== default arguments should disable aggregation + +.Schema +[source,graphql,schema=true] +---- +type Actor @node { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) +} + +type Appearance @node { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) +} + +union Person = Actor | Appearance + +type Movie @node { + title: String + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable +} +---- + +.Augmented Schema +[source,graphql,augmented=true] +---- +schema { + query: Query +} + +type Actor { + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +""" +Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. +""" +input ActorSort { + password: SortDirection + username: SortDirection +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + """ + Return Actors where all of the related ActorMoviesConnections match this filter + """ + moviesConnection_ALL: ActorMoviesConnectionWhere + """ + Return Actors where none of the related ActorMoviesConnections match this filter + """ + moviesConnection_NONE: ActorMoviesConnectionWhere + """ + Return Actors where one of the related ActorMoviesConnections match this filter + """ + moviesConnection_SINGLE: ActorMoviesConnectionWhere + """ + Return Actors where some of the related ActorMoviesConnections match this filter + """ + moviesConnection_SOME: ActorMoviesConnectionWhere + """Return Actors where all of the related Movies match this filter""" + movies_ALL: MovieWhere + """Return Actors where none of the related Movies match this filter""" + movies_NONE: MovieWhere + """Return Actors where one of the related Movies match this filter""" + movies_SINGLE: MovieWhere + """Return Actors where some of the related Movies match this filter""" + movies_SOME: MovieWhere + password: String @deprecated(reason: "Please use the explicit _EQ version") + password_CONTAINS: String + password_ENDS_WITH: String + password_EQ: String + password_IN: [String!] + password_STARTS_WITH: String + username: String @deprecated(reason: "Please use the explicit _EQ version") + username_CONTAINS: String + username_ENDS_WITH: String + username_EQ: String + username_IN: [String!] + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Appearance { + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! + password: String! + username: String! +} + +type AppearanceEdge { + cursor: String! + node: Appearance! +} + +type AppearanceMoviesConnection { + edges: [AppearanceMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input AppearanceMoviesConnectionSort { + node: MovieSort +} + +input AppearanceMoviesConnectionWhere { + AND: [AppearanceMoviesConnectionWhere!] + NOT: AppearanceMoviesConnectionWhere + OR: [AppearanceMoviesConnectionWhere!] + node: MovieWhere +} + +type AppearanceMoviesRelationship { + cursor: String! + node: Movie! +} + +""" +Fields to sort Appearances by. The order in which sorts are applied is not guaranteed when specifying many fields in one AppearanceSort object. +""" +input AppearanceSort { + password: SortDirection + username: SortDirection +} + +input AppearanceWhere { + AND: [AppearanceWhere!] + NOT: AppearanceWhere + OR: [AppearanceWhere!] + """ + Return Appearances where all of the related AppearanceMoviesConnections match this filter + """ + moviesConnection_ALL: AppearanceMoviesConnectionWhere + """ + Return Appearances where none of the related AppearanceMoviesConnections match this filter + """ + moviesConnection_NONE: AppearanceMoviesConnectionWhere + """ + Return Appearances where one of the related AppearanceMoviesConnections match this filter + """ + moviesConnection_SINGLE: AppearanceMoviesConnectionWhere + """ + Return Appearances where some of the related AppearanceMoviesConnections match this filter + """ + moviesConnection_SOME: AppearanceMoviesConnectionWhere + """Return Appearances where all of the related Movies match this filter""" + movies_ALL: MovieWhere + """Return Appearances where none of the related Movies match this filter""" + movies_NONE: MovieWhere + """Return Appearances where one of the related Movies match this filter""" + movies_SINGLE: MovieWhere + """Return Appearances where some of the related Movies match this filter""" + movies_SOME: MovieWhere + password: String @deprecated(reason: "Please use the explicit _EQ version") + password_CONTAINS: String + password_ENDS_WITH: String + password_EQ: String + password_IN: [String!] + password_STARTS_WITH: String + username: String @deprecated(reason: "Please use the explicit _EQ version") + username_CONTAINS: String + username_ENDS_WITH: String + username_EQ: String + username_IN: [String!] + username_STARTS_WITH: String +} + +type AppearancesConnection { + edges: [AppearanceEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Movie { + actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +input MovieActorsActorConnectionWhere { + AND: [MovieActorsActorConnectionWhere!] + NOT: MovieActorsActorConnectionWhere + OR: [MovieActorsActorConnectionWhere!] + node: ActorWhere +} + +input MovieActorsAppearanceConnectionWhere { + AND: [MovieActorsAppearanceConnectionWhere!] + NOT: MovieActorsAppearanceConnectionWhere + OR: [MovieActorsAppearanceConnectionWhere!] + node: AppearanceWhere +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionWhere { + Actor: MovieActorsActorConnectionWhere + Appearance: MovieActorsAppearanceConnectionWhere +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +""" +Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. +""" +input MovieSort { + title: SortDirection +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + """ + Return Movies where all of the related MovieActorsConnections match this filter + """ + actorsConnection_ALL: MovieActorsConnectionWhere + """ + Return Movies where none of the related MovieActorsConnections match this filter + """ + actorsConnection_NONE: MovieActorsConnectionWhere + """ + Return Movies where one of the related MovieActorsConnections match this filter + """ + actorsConnection_SINGLE: MovieActorsConnectionWhere + """ + Return Movies where some of the related MovieActorsConnections match this filter + """ + actorsConnection_SOME: MovieActorsConnectionWhere + """Return Movies where all of the related People match this filter""" + actors_ALL: PersonWhere + """Return Movies where none of the related People match this filter""" + actors_NONE: PersonWhere + """Return Movies where one of the related People match this filter""" + actors_SINGLE: PersonWhere + """Return Movies where some of the related People match this filter""" + actors_SOME: PersonWhere + title: String @deprecated(reason: "Please use the explicit _EQ version") + title_CONTAINS: String + title_ENDS_WITH: String + title_EQ: String + title_IN: [String] + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +"""Pagination information (Relay)""" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +union Person = Actor | Appearance + +input PersonWhere { + Actor: ActorWhere + Appearance: AppearanceWhere +} + +type Query { + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + appearances(limit: Int, offset: Int, sort: [AppearanceSort!], where: AppearanceWhere): [Appearance!]! + appearancesConnection(after: String, first: Int, sort: [AppearanceSort!], where: AppearanceWhere): AppearancesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, where: PersonWhere): [Person!]! +} + +"""An enum for sorting in either ascending or descending order.""" +enum SortDirection { + """Sort by field values in ascending order.""" + ASC + """Sort by field values in descending order.""" + DESC +} +---- + +=== enable only value filters + +.Schema +[source,graphql,schema=true] +---- +type Actor @node { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) +} + +type Appearance @node { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) +} + +union Person = Actor | Appearance + +type Movie @node { + title: String + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable(byValue: true) +} +---- + +.Augmented Schema +[source,graphql,augmented=true] +---- +schema { + query: Query +} + +type Actor { + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +""" +Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. +""" +input ActorSort { + password: SortDirection + username: SortDirection +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + """ + Return Actors where all of the related ActorMoviesConnections match this filter + """ + moviesConnection_ALL: ActorMoviesConnectionWhere + """ + Return Actors where none of the related ActorMoviesConnections match this filter + """ + moviesConnection_NONE: ActorMoviesConnectionWhere + """ + Return Actors where one of the related ActorMoviesConnections match this filter + """ + moviesConnection_SINGLE: ActorMoviesConnectionWhere + """ + Return Actors where some of the related ActorMoviesConnections match this filter + """ + moviesConnection_SOME: ActorMoviesConnectionWhere + """Return Actors where all of the related Movies match this filter""" + movies_ALL: MovieWhere + """Return Actors where none of the related Movies match this filter""" + movies_NONE: MovieWhere + """Return Actors where one of the related Movies match this filter""" + movies_SINGLE: MovieWhere + """Return Actors where some of the related Movies match this filter""" + movies_SOME: MovieWhere + password: String @deprecated(reason: "Please use the explicit _EQ version") + password_CONTAINS: String + password_ENDS_WITH: String + password_EQ: String + password_IN: [String!] + password_STARTS_WITH: String + username: String @deprecated(reason: "Please use the explicit _EQ version") + username_CONTAINS: String + username_ENDS_WITH: String + username_EQ: String + username_IN: [String!] + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Appearance { + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! password: String! username: String! } -type ActorEdge { +type AppearanceEdge { cursor: String! - node: Actor! + node: Appearance! } -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! +type AppearanceMoviesConnection { + edges: [AppearanceMoviesRelationship!]! pageInfo: PageInfo! totalCount: Int! } -input ActorMoviesConnectionSort { +input AppearanceMoviesConnectionSort { node: MovieSort } -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] +input AppearanceMoviesConnectionWhere { + AND: [AppearanceMoviesConnectionWhere!] + NOT: AppearanceMoviesConnectionWhere + OR: [AppearanceMoviesConnectionWhere!] node: MovieWhere } -type ActorMoviesRelationship { +type AppearanceMoviesRelationship { cursor: String! node: Movie! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ -Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. +Fields to sort Appearances by. The order in which sorts are applied is not guaranteed when specifying many fields in one AppearanceSort object. """ -input ActorSort { +input AppearanceSort { password: SortDirection username: SortDirection } -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] +input AppearanceWhere { + AND: [AppearanceWhere!] + NOT: AppearanceWhere + OR: [AppearanceWhere!] """ - Return Actors where all of the related ActorMoviesConnections match this filter + Return Appearances where all of the related AppearanceMoviesConnections match this filter """ - moviesConnection_ALL: ActorMoviesConnectionWhere + moviesConnection_ALL: AppearanceMoviesConnectionWhere """ - Return Actors where none of the related ActorMoviesConnections match this filter + Return Appearances where none of the related AppearanceMoviesConnections match this filter """ - moviesConnection_NONE: ActorMoviesConnectionWhere + moviesConnection_NONE: AppearanceMoviesConnectionWhere """ - Return Actors where one of the related ActorMoviesConnections match this filter + Return Appearances where one of the related AppearanceMoviesConnections match this filter """ - moviesConnection_SINGLE: ActorMoviesConnectionWhere + moviesConnection_SINGLE: AppearanceMoviesConnectionWhere """ - Return Actors where some of the related ActorMoviesConnections match this filter + Return Appearances where some of the related AppearanceMoviesConnections match this filter """ - moviesConnection_SOME: ActorMoviesConnectionWhere - """Return Actors where all of the related Movies match this filter""" + moviesConnection_SOME: AppearanceMoviesConnectionWhere + """Return Appearances where all of the related Movies match this filter""" movies_ALL: MovieWhere - """Return Actors where none of the related Movies match this filter""" + """Return Appearances where none of the related Movies match this filter""" movies_NONE: MovieWhere - """Return Actors where one of the related Movies match this filter""" + """Return Appearances where one of the related Movies match this filter""" movies_SINGLE: MovieWhere - """Return Actors where some of the related Movies match this filter""" + """Return Appearances where some of the related Movies match this filter""" movies_SOME: MovieWhere - password: String + password: String @deprecated(reason: "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason: "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } -type ActorsConnection { - edges: [ActorEdge!]! +type AppearancesConnection { + edges: [AppearanceEdge!]! pageInfo: PageInfo! totalCount: Int! } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } +input MovieActorsActorConnectionWhere { + AND: [MovieActorsActorConnectionWhere!] + NOT: MovieActorsActorConnectionWhere + OR: [MovieActorsActorConnectionWhere!] + node: ActorWhere +} + +input MovieActorsAppearanceConnectionWhere { + AND: [MovieActorsAppearanceConnectionWhere!] + NOT: MovieActorsAppearanceConnectionWhere + OR: [MovieActorsAppearanceConnectionWhere!] + node: AppearanceWhere +} + type MovieActorsConnection { edges: [MovieActorsRelationship!]! pageInfo: PageInfo! totalCount: Int! } -input MovieActorsConnectionSort { - node: PersonSort -} - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere + Actor: MovieActorsActorConnectionWhere + Appearance: MovieActorsAppearanceConnectionWhere } type MovieActorsRelationship { @@ -164,15 +1810,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -184,9 +1821,34 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - title: String + """ + Return Movies where all of the related MovieActorsConnections match this filter + """ + actorsConnection_ALL: MovieActorsConnectionWhere + """ + Return Movies where none of the related MovieActorsConnections match this filter + """ + actorsConnection_NONE: MovieActorsConnectionWhere + """ + Return Movies where one of the related MovieActorsConnections match this filter + """ + actorsConnection_SINGLE: MovieActorsConnectionWhere + """ + Return Movies where some of the related MovieActorsConnections match this filter + """ + actorsConnection_SOME: MovieActorsConnectionWhere + """Return Movies where all of the related People match this filter""" + actors_ALL: PersonWhere + """Return Movies where none of the related People match this filter""" + actors_NONE: PersonWhere + """Return Movies where one of the related People match this filter""" + actors_SINGLE: PersonWhere + """Return Movies where some of the related People match this filter""" + actors_SOME: PersonWhere + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } @@ -205,60 +1867,21 @@ type PageInfo { startCursor: String } -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -interface Person { - username: String! -} - -type PersonEdge { - cursor: String! - node: Person! -} - -enum PersonImplementation { - Actor -} - -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort] -} - -""" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -""" -input PersonSort { - username: SortDirection -} +union Person = Actor | Appearance input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - typename_IN: [PersonImplementation!] - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String + Actor: ActorWhere + Appearance: AppearanceWhere } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + appearances(limit: Int, offset: Int, sort: [AppearanceSort!], where: AppearanceWhere): [Appearance!]! + appearancesConnection(after: String, first: Int, sort: [AppearanceSort!], where: AppearanceWhere): AppearancesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, where: PersonWhere): [Person!]! } """An enum for sorting in either ascending or descending order.""" @@ -279,13 +1902,13 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { username: String! password: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } -type Movie { +type Movie @node { title: String @filterable actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } @@ -299,8 +1922,8 @@ schema { } type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! } @@ -332,15 +1955,6 @@ type ActorMoviesRelationship { node: Movie! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -377,14 +1991,16 @@ input ActorWhere { movies_SINGLE: MovieWhere """Return Actors where some of the related Movies match this filter""" movies_SOME: MovieWhere - password: String + password: String @deprecated(reason: "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason: "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } @@ -396,8 +2012,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -428,15 +2044,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -472,9 +2079,10 @@ input MovieWhere { actors_SINGLE: ActorWhere """Return Movies where some of the related Actors match this filter""" actors_SOME: ActorWhere - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } @@ -494,10 +2102,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" @@ -516,13 +2124,13 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { username: String! password: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } -type Movie { +type Movie @node { title: String actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) @filterable } @@ -536,8 +2144,8 @@ schema { } type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! } @@ -569,15 +2177,6 @@ type ActorMoviesRelationship { node: Movie! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -614,14 +2213,16 @@ input ActorWhere { movies_SINGLE: MovieWhere """Return Actors where some of the related Movies match this filter""" movies_SOME: MovieWhere - password: String + password: String @deprecated(reason: "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason: "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } @@ -633,8 +2234,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -665,15 +2266,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -709,9 +2301,10 @@ input MovieWhere { actors_SINGLE: ActorWhere """Return Movies where some of the related Actors match this filter""" actors_SOME: ActorWhere - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } @@ -731,10 +2324,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" @@ -751,13 +2344,13 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { username: String! password: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } -type Movie { +type Movie @node { title: String actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) @filterable(byValue: true) } @@ -771,8 +2364,8 @@ schema { } type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! } @@ -804,15 +2397,6 @@ type ActorMoviesRelationship { node: Movie! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -849,14 +2433,16 @@ input ActorWhere { movies_SINGLE: MovieWhere """Return Actors where some of the related Movies match this filter""" movies_SOME: MovieWhere - password: String + password: String @deprecated(reason: "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason: "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } @@ -868,8 +2454,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -900,15 +2486,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -944,9 +2521,10 @@ input MovieWhere { actors_SINGLE: ActorWhere """Return Movies where some of the related Actors match this filter""" actors_SOME: ActorWhere - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } @@ -966,10 +2544,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" @@ -988,7 +2566,7 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Actor implements Person { +type Actor implements Person @node { username: String! password: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -998,7 +2576,7 @@ interface Person { username: String! } -type Movie { +type Movie @node { title: String actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable } @@ -1012,8 +2590,8 @@ schema { } type Actor implements Person { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! } @@ -1045,15 +2623,6 @@ type ActorMoviesRelationship { node: Movie! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -1090,14 +2659,16 @@ input ActorWhere { movies_SINGLE: MovieWhere """Return Actors where some of the related Movies match this filter""" movies_SOME: MovieWhere - password: String + password: String @deprecated(reason: "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason: "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } @@ -1109,8 +2680,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -1141,15 +2712,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -1185,9 +2747,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } @@ -1225,15 +2788,6 @@ enum PersonImplementation { Actor } -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort] -} - """ Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. """ @@ -1245,21 +2799,22 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - typename_IN: [PersonImplementation!] - username: String + typename: [PersonImplementation!] + username: String @deprecated(reason: "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } """An enum for sorting in either ascending or descending order.""" @@ -1276,7 +2831,7 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Actor implements Person { +type Actor implements Person @node { username: String! password: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -1286,7 +2841,7 @@ interface Person { username: String! } -type Movie { +type Movie @node { title: String actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable(byValue: true) } @@ -1300,8 +2855,8 @@ schema { } type Actor implements Person { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! } @@ -1333,15 +2888,6 @@ type ActorMoviesRelationship { node: Movie! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -1378,14 +2924,16 @@ input ActorWhere { movies_SINGLE: MovieWhere """Return Actors where some of the related Movies match this filter""" movies_SOME: MovieWhere - password: String + password: String @deprecated(reason: "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason: "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } @@ -1397,8 +2945,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -1429,15 +2977,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -1473,9 +3012,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } @@ -1513,15 +3053,6 @@ enum PersonImplementation { Actor } -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort] -} - """ Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. """ @@ -1533,21 +3064,22 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - typename_IN: [PersonImplementation!] - username: String + typename: [PersonImplementation!] + username: String @deprecated(reason: "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } """An enum for sorting in either ascending or descending order.""" @@ -1566,13 +3098,13 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { username: String! password: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } -type Appearance { +type Appearance @node { username: String! password: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -1580,7 +3112,7 @@ type Appearance { union Person = Actor | Appearance -type Movie { +type Movie @node { title: String actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable } @@ -1594,8 +3126,8 @@ schema { } type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! } @@ -1627,15 +3159,6 @@ type ActorMoviesRelationship { node: Movie! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -1672,14 +3195,16 @@ input ActorWhere { movies_SINGLE: MovieWhere """Return Actors where some of the related Movies match this filter""" movies_SOME: MovieWhere - password: String + password: String @deprecated(reason: "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason: "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } @@ -1691,8 +3216,8 @@ type ActorsConnection { } type Appearance { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! password: String! username: String! } @@ -1724,15 +3249,6 @@ type AppearanceMoviesRelationship { node: Movie! } -input AppearanceOptions { - limit: Int - offset: Int - """ - Specify one or more AppearanceSort objects to sort Appearances by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [AppearanceSort!] -} - """ Fields to sort Appearances by. The order in which sorts are applied is not guaranteed when specifying many fields in one AppearanceSort object. """ @@ -1769,14 +3285,16 @@ input AppearanceWhere { movies_SINGLE: MovieWhere """Return Appearances where some of the related Movies match this filter""" movies_SOME: MovieWhere - password: String + password: String @deprecated(reason: "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason: "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } @@ -1788,8 +3306,8 @@ type AppearancesConnection { } type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -1828,15 +3346,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -1872,9 +3381,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } @@ -1901,19 +3411,13 @@ input PersonWhere { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - appearances(options: AppearanceOptions, where: AppearanceWhere): [Appearance!]! - appearancesConnection(after: String, first: Int, sort: [AppearanceSort], where: AppearanceWhere): AppearancesConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + appearances(limit: Int, offset: Int, sort: [AppearanceSort!], where: AppearanceWhere): [Appearance!]! + appearancesConnection(after: String, first: Int, sort: [AppearanceSort!], where: AppearanceWhere): AppearancesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, where: PersonWhere): [Person!]! } """An enum for sorting in either ascending or descending order.""" @@ -1930,13 +3434,13 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { username: String! password: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } -type Appearance { +type Appearance @node { username: String! password: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -1944,7 +3448,7 @@ type Appearance { union Person = Actor | Appearance -type Movie { +type Movie @node { title: String actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable(byValue: true) } @@ -1958,8 +3462,8 @@ schema { } type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! } @@ -1991,15 +3495,6 @@ type ActorMoviesRelationship { node: Movie! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -2036,14 +3531,16 @@ input ActorWhere { movies_SINGLE: MovieWhere """Return Actors where some of the related Movies match this filter""" movies_SOME: MovieWhere - password: String + password: String @deprecated(reason: "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason: "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } @@ -2055,8 +3552,8 @@ type ActorsConnection { } type Appearance { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! password: String! username: String! } @@ -2088,15 +3585,6 @@ type AppearanceMoviesRelationship { node: Movie! } -input AppearanceOptions { - limit: Int - offset: Int - """ - Specify one or more AppearanceSort objects to sort Appearances by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [AppearanceSort!] -} - """ Fields to sort Appearances by. The order in which sorts are applied is not guaranteed when specifying many fields in one AppearanceSort object. """ @@ -2133,14 +3621,16 @@ input AppearanceWhere { movies_SINGLE: MovieWhere """Return Appearances where some of the related Movies match this filter""" movies_SOME: MovieWhere - password: String + password: String @deprecated(reason: "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason: "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } @@ -2152,8 +3642,8 @@ type AppearancesConnection { } type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -2192,15 +3682,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -2236,9 +3717,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } @@ -2265,19 +3747,13 @@ input PersonWhere { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - appearances(options: AppearanceOptions, where: AppearanceWhere): [Appearance!]! - appearancesConnection(after: String, first: Int, sort: [AppearanceSort], where: AppearanceWhere): AppearancesConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + appearances(limit: Int, offset: Int, sort: [AppearanceSort!], where: AppearanceWhere): [Appearance!]! + appearancesConnection(after: String, first: Int, sort: [AppearanceSort!], where: AppearanceWhere): AppearancesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, where: PersonWhere): [Person!]! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/directives/private.adoc b/core/src/test/resources/tck-test-files/schema/v2/directives/private.adoc index 8c118187..631a56fb 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/directives/private.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/directives/private.adoc @@ -13,7 +13,7 @@ interface UserInterface { private: String @private } -type User implements UserInterface { +type User implements UserInterface @node { id: ID password: String @private private: String @private @@ -40,10 +40,10 @@ type PageInfo { } type Query { - userInterfaces(options: UserInterfaceOptions, where: UserInterfaceWhere): [UserInterface!]! - userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort], where: UserInterfaceWhere): UserInterfacesConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! + userInterfaces(limit: Int, offset: Int, sort: [UserInterfaceSort!], where: UserInterfaceWhere): [UserInterface!]! + userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort!], where: UserInterfaceWhere): UserInterfacesConnection! + users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! + usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } type User implements UserInterface { @@ -84,13 +84,6 @@ enum UserInterfaceImplementation { User } -input UserInterfaceOptions { - limit: Int - offset: Int - "Specify one or more UserInterfaceSort objects to sort UserInterfaces by. The sorts will be applied in the order in which they are arranged in the array." - sort: [UserInterfaceSort] -} - "Fields to sort UserInterfaces by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserInterfaceSort object." input UserInterfaceSort { id: SortDirection @@ -100,19 +93,13 @@ input UserInterfaceWhere { AND: [UserInterfaceWhere!] NOT: UserInterfaceWhere OR: [UserInterfaceWhere!] - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - typename_IN: [UserInterfaceImplementation!] -} - -input UserOptions { - limit: Int - offset: Int - "Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array." - sort: [UserSort!] + typename: [UserInterfaceImplementation!] } "Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object." @@ -124,9 +111,10 @@ input UserWhere { AND: [UserWhere!] NOT: UserWhere OR: [UserWhere!] - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -143,7 +131,7 @@ interface UserInterface { private: String @private } -type User implements UserInterface { +type User implements UserInterface @node { id: ID password: String @private private: String @@ -170,10 +158,10 @@ type PageInfo { } type Query { - userInterfaces(options: UserInterfaceOptions, where: UserInterfaceWhere): [UserInterface!]! - userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort], where: UserInterfaceWhere): UserInterfacesConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! + userInterfaces(limit: Int, offset: Int, sort: [UserInterfaceSort!], where: UserInterfaceWhere): [UserInterface!]! + userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort!], where: UserInterfaceWhere): UserInterfacesConnection! + users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! + usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } type User implements UserInterface { @@ -215,13 +203,6 @@ enum UserInterfaceImplementation { User } -input UserInterfaceOptions { - limit: Int - offset: Int - "Specify one or more UserInterfaceSort objects to sort UserInterfaces by. The sorts will be applied in the order in which they are arranged in the array." - sort: [UserInterfaceSort] -} - "Fields to sort UserInterfaces by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserInterfaceSort object." input UserInterfaceSort { id: SortDirection @@ -231,19 +212,13 @@ input UserInterfaceWhere { AND: [UserInterfaceWhere!] NOT: UserInterfaceWhere OR: [UserInterfaceWhere!] - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - typename_IN: [UserInterfaceImplementation!] -} - -input UserOptions { - limit: Int - offset: Int - "Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array." - sort: [UserSort!] + typename: [UserInterfaceImplementation!] } "Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object." @@ -256,14 +231,16 @@ input UserWhere { AND: [UserWhere!] NOT: UserWhere OR: [UserWhere!] - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - private: String + private: String @deprecated(reason : "Please use the explicit _EQ version") private_CONTAINS: String private_ENDS_WITH: String + private_EQ: String private_IN: [String] private_STARTS_WITH: String } diff --git a/core/src/test/resources/tck-test-files/schema/v2/directives/private.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/directives/private.js.adoc index e973d526..a4888a1c 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/directives/private.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/directives/private.js.adoc @@ -14,7 +14,7 @@ interface UserInterface { private: String @private } -type User implements UserInterface { +type User implements UserInterface @node { id: ID password: String @private private: String @private @@ -37,10 +37,10 @@ type PageInfo { } type Query { - userInterfaces(options: UserInterfaceOptions, where: UserInterfaceWhere): [UserInterface!]! - userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort], where: UserInterfaceWhere): UserInterfacesConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! + userInterfaces(limit: Int, offset: Int, sort: [UserInterfaceSort!], where: UserInterfaceWhere): [UserInterface!]! + userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort!], where: UserInterfaceWhere): UserInterfacesConnection! + users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! + usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } """An enum for sorting in either ascending or descending order.""" @@ -73,15 +73,6 @@ enum UserInterfaceImplementation { User } -input UserInterfaceOptions { - limit: Int - offset: Int - """ - Specify one or more UserInterfaceSort objects to sort UserInterfaces by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [UserInterfaceSort] -} - """ Fields to sort UserInterfaces by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserInterfaceSort object. """ @@ -93,12 +84,13 @@ input UserInterfaceWhere { AND: [UserInterfaceWhere!] NOT: UserInterfaceWhere OR: [UserInterfaceWhere!] - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - typename_IN: [UserInterfaceImplementation!] + typename: [UserInterfaceImplementation!] } type UserInterfacesConnection { @@ -107,15 +99,6 @@ type UserInterfacesConnection { totalCount: Int! } -input UserOptions { - limit: Int - offset: Int - """ - Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [UserSort!] -} - """ Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. """ @@ -127,9 +110,10 @@ input UserWhere { AND: [UserWhere!] NOT: UserWhere OR: [UserWhere!] - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -151,7 +135,7 @@ interface UserInterface { private: String @private } -type User implements UserInterface { +type User implements UserInterface @node { id: ID password: String @private private: String @@ -174,10 +158,10 @@ type PageInfo { } type Query { - userInterfaces(options: UserInterfaceOptions, where: UserInterfaceWhere): [UserInterface!]! - userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort], where: UserInterfaceWhere): UserInterfacesConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! + userInterfaces(limit: Int, offset: Int, sort: [UserInterfaceSort!], where: UserInterfaceWhere): [UserInterface!]! + userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort!], where: UserInterfaceWhere): UserInterfacesConnection! + users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! + usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } """An enum for sorting in either ascending or descending order.""" @@ -211,15 +195,6 @@ enum UserInterfaceImplementation { User } -input UserInterfaceOptions { - limit: Int - offset: Int - """ - Specify one or more UserInterfaceSort objects to sort UserInterfaces by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [UserInterfaceSort] -} - """ Fields to sort UserInterfaces by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserInterfaceSort object. """ @@ -231,12 +206,13 @@ input UserInterfaceWhere { AND: [UserInterfaceWhere!] NOT: UserInterfaceWhere OR: [UserInterfaceWhere!] - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - typename_IN: [UserInterfaceImplementation!] + typename: [UserInterfaceImplementation!] } type UserInterfacesConnection { @@ -245,15 +221,6 @@ type UserInterfacesConnection { totalCount: Int! } -input UserOptions { - limit: Int - offset: Int - """ - Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [UserSort!] -} - """ Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. """ @@ -266,14 +233,16 @@ input UserWhere { AND: [UserWhere!] NOT: UserWhere OR: [UserWhere!] - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - private: String + private: String @deprecated(reason: "Please use the explicit _EQ version") private_CONTAINS: String private_ENDS_WITH: String + private_EQ: String private_IN: [String] private_STARTS_WITH: String } diff --git a/core/src/test/resources/tck-test-files/schema/v2/directives/query.adoc b/core/src/test/resources/tck-test-files/schema/v2/directives/query.adoc index 7fbfc6c8..a95e06df 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/directives/query.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/directives/query.adoc @@ -10,12 +10,12 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { username: String! password: String! } -type Movie { +type Movie @node { title: String } @@ -71,10 +71,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -85,13 +85,6 @@ enum SortDirection { DESC } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { password: SortDirection @@ -102,25 +95,20 @@ input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - password: String + password: String @deprecated(reason : "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason : "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { title: SortDirection @@ -130,9 +118,10 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } @@ -144,11 +133,11 @@ input MovieWhere { .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String } -type Movie { +type Movie @node { title: String } diff --git a/core/src/test/resources/tck-test-files/schema/v2/directives/query.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/directives/query.js.adoc index 503950fd..f9024c4b 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/directives/query.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/directives/query.js.adoc @@ -11,12 +11,12 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { username: String! password: String! } -type Movie { +type Movie @node { title: String } @@ -42,15 +42,6 @@ type ActorEdge { node: Actor! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -63,14 +54,16 @@ input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - password: String + password: String @deprecated(reason: "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason: "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } @@ -90,15 +83,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -110,9 +94,10 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } @@ -132,10 +117,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" @@ -152,11 +137,11 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String } -type Movie { +type Movie @node { title: String } diff --git a/core/src/test/resources/tck-test-files/schema/v2/directives/relationship-aggregate.adoc b/core/src/test/resources/tck-test-files/schema/v2/directives/relationship-aggregate.adoc index f4448ffa..56681583 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/directives/relationship-aggregate.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/directives/relationship-aggregate.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { username: String! password: String! } -type Movie { +type Movie @node { title: String actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } @@ -43,8 +43,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -79,10 +79,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -93,13 +93,6 @@ enum SortDirection { DESC } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { password: SortDirection @@ -110,14 +103,16 @@ input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - password: String + password: String @deprecated(reason : "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason : "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } @@ -133,13 +128,6 @@ input MovieActorsConnectionWhere { node: ActorWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { title: SortDirection @@ -165,9 +153,10 @@ input MovieWhere { actors_SINGLE: ActorWhere "Return Movies where some of the related Actors match this filter" actors_SOME: ActorWhere - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } @@ -181,12 +170,12 @@ input MovieWhere { .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { username: String! password: String! } -type Movie { +type Movie @node { title: String actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } @@ -216,8 +205,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -252,10 +241,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -266,13 +255,6 @@ enum SortDirection { DESC } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { password: SortDirection @@ -283,14 +265,16 @@ input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - password: String + password: String @deprecated(reason : "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason : "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } @@ -306,13 +290,6 @@ input MovieActorsConnectionWhere { node: ActorWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { title: SortDirection @@ -338,9 +315,10 @@ input MovieWhere { actors_SINGLE: ActorWhere "Return Movies where some of the related Actors match this filter" actors_SOME: ActorWhere - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } @@ -354,7 +332,7 @@ input MovieWhere { .Schema [source,graphql,schema=true] ---- -type Actor implements Person { +type Actor implements Person @node { username: String! password: String! } @@ -364,7 +342,7 @@ interface Person { password: String! } -type Movie { +type Movie @node { title: String actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) } @@ -399,8 +377,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -446,12 +424,12 @@ type PersonEdge { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } enum PersonImplementation { @@ -466,13 +444,6 @@ enum SortDirection { DESC } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { password: SortDirection @@ -483,14 +454,16 @@ input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - password: String + password: String @deprecated(reason : "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason : "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } @@ -506,13 +479,6 @@ input MovieActorsConnectionWhere { node: PersonWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { title: SortDirection @@ -538,20 +504,14 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort] -} - "Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." input PersonSort { password: SortDirection @@ -562,15 +522,17 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - password: String + password: String @deprecated(reason : "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - typename_IN: [PersonImplementation!] - username: String + typename: [PersonImplementation!] + username: String @deprecated(reason : "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } @@ -584,18 +546,18 @@ input PersonWhere { .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { username: String! password: String! } -type Person { +type Person @node { name: String! } union CastMember = Actor | Person -type Movie { +type Movie @node { title: String actors: [CastMember!]! @relationship(type: "ACTED_IN", direction: IN) } @@ -627,8 +589,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: CastMemberWhere): [CastMember!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: CastMemberWhere): [CastMember!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -678,13 +640,13 @@ type PersonEdge { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - castMembers(options: QueryOptions, where: CastMemberWhere): [CastMember!]! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + castMembers(limit: Int, offset: Int, where: CastMemberWhere): [CastMember!]! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } "An enum for sorting in either ascending or descending order." @@ -695,13 +657,6 @@ enum SortDirection { DESC } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { password: SortDirection @@ -712,14 +667,16 @@ input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - password: String + password: String @deprecated(reason : "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason : "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } @@ -748,13 +705,6 @@ input MovieActorsPersonConnectionWhere { node: PersonWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { title: SortDirection @@ -780,20 +730,14 @@ input MovieWhere { actors_SINGLE: CastMemberWhere "Return Movies where some of the related CastMembers match this filter" actors_SOME: CastMemberWhere - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort!] -} - "Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." input PersonSort { name: SortDirection @@ -803,17 +747,12 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - ---- diff --git a/core/src/test/resources/tck-test-files/schema/v2/directives/relationship-aggregate.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/directives/relationship-aggregate.js.adoc index b5c6940a..3a28e6a4 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/directives/relationship-aggregate.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/directives/relationship-aggregate.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { username: String! password: String! } -type Movie { +type Movie @node { title: String actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } @@ -37,15 +37,6 @@ type ActorEdge { node: Actor! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -58,14 +49,16 @@ input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - password: String + password: String @deprecated(reason: "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason: "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } @@ -77,8 +70,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -109,15 +102,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -153,9 +137,10 @@ input MovieWhere { actors_SINGLE: ActorWhere """Return Movies where some of the related Actors match this filter""" actors_SOME: ActorWhere - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } @@ -175,10 +160,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" @@ -197,12 +182,12 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { username: String! password: String! } -type Movie { +type Movie @node { title: String actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } @@ -225,15 +210,6 @@ type ActorEdge { node: Actor! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -246,14 +222,16 @@ input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - password: String + password: String @deprecated(reason: "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason: "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } @@ -265,8 +243,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -297,15 +275,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -341,9 +310,10 @@ input MovieWhere { actors_SINGLE: ActorWhere """Return Movies where some of the related Actors match this filter""" actors_SOME: ActorWhere - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } @@ -363,10 +333,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" @@ -385,7 +355,7 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Actor implements Person { +type Actor implements Person @node { username: String! password: String! } @@ -395,7 +365,7 @@ interface Person { password: String! } -type Movie { +type Movie @node { title: String actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) } @@ -418,15 +388,6 @@ type ActorEdge { node: Actor! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -439,14 +400,16 @@ input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - password: String + password: String @deprecated(reason: "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason: "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } @@ -458,8 +421,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -490,15 +453,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -534,9 +488,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } @@ -575,15 +530,6 @@ enum PersonImplementation { Actor } -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort] -} - """ Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. """ @@ -596,26 +542,28 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - password: String + password: String @deprecated(reason: "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - typename_IN: [PersonImplementation!] - username: String + typename: [PersonImplementation!] + username: String @deprecated(reason: "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } """An enum for sorting in either ascending or descending order.""" @@ -634,18 +582,18 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { username: String! password: String! } -type Person { +type Person @node { name: String! } union CastMember = Actor | Person -type Movie { +type Movie @node { title: String actors: [CastMember!]! @relationship(type: "ACTED_IN", direction: IN) } @@ -668,15 +616,6 @@ type ActorEdge { node: Actor! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -689,14 +628,16 @@ input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - password: String + password: String @deprecated(reason: "Please use the explicit _EQ version") password_CONTAINS: String password_ENDS_WITH: String + password_EQ: String password_IN: [String!] password_STARTS_WITH: String - username: String + username: String @deprecated(reason: "Please use the explicit _EQ version") username_CONTAINS: String username_ENDS_WITH: String + username_EQ: String username_IN: [String!] username_STARTS_WITH: String } @@ -715,8 +656,8 @@ input CastMemberWhere { } type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: CastMemberWhere): [CastMember!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: CastMemberWhere): [CastMember!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -755,15 +696,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -799,9 +731,10 @@ input MovieWhere { actors_SINGLE: CastMemberWhere """Return Movies where some of the related CastMembers match this filter""" actors_SOME: CastMemberWhere - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } @@ -835,15 +768,6 @@ type PersonEdge { node: Person! } -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort!] -} - """ Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. """ @@ -855,27 +779,22 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - castMembers(options: QueryOptions, where: CastMemberWhere): [CastMember!]! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + castMembers(limit: Int, offset: Int, where: CastMemberWhere): [CastMember!]! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/directives/relationship-nested-operations.adoc b/core/src/test/resources/tck-test-files/schema/v2/directives/relationship-nested-operations.adoc index a5cb6654..29a628a4 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/directives/relationship-nested-operations.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/directives/relationship-nested-operations.adoc @@ -10,11 +10,11 @@ .Schema [source,graphql,schema=true] ---- -type Person { +type Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: []) } @@ -28,8 +28,8 @@ schema { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -79,10 +79,10 @@ type PersonEdge { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } "An enum for sorting in either ascending or descending order." @@ -104,13 +104,6 @@ input MovieActorsConnectionWhere { node: PersonWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -136,20 +129,14 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort!] -} - "Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." input PersonSort { name: SortDirection @@ -159,9 +146,10 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -173,11 +161,11 @@ input PersonWhere { .Schema [source,graphql,schema=true] ---- -type Person { +type Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) } @@ -191,8 +179,8 @@ schema { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -242,10 +230,10 @@ type PersonEdge { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } "An enum for sorting in either ascending or descending order." @@ -267,13 +255,6 @@ input MovieActorsConnectionWhere { node: PersonWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -299,20 +280,14 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort!] -} - "Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." input PersonSort { name: SortDirection @@ -322,9 +297,10 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -336,11 +312,11 @@ input PersonWhere { .Schema [source,graphql,schema=true] ---- -type Person { +type Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT]) } @@ -354,8 +330,8 @@ schema { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -405,10 +381,10 @@ type PersonEdge { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } "An enum for sorting in either ascending or descending order." @@ -430,13 +406,6 @@ input MovieActorsConnectionWhere { node: PersonWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -462,20 +431,14 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort!] -} - "Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." input PersonSort { name: SortDirection @@ -485,9 +448,10 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -499,11 +463,11 @@ input PersonWhere { .Schema [source,graphql,schema=true] ---- -type Person { +type Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [UPDATE]) } @@ -517,8 +481,8 @@ schema { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -568,10 +532,10 @@ type PersonEdge { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } "An enum for sorting in either ascending or descending order." @@ -593,13 +557,6 @@ input MovieActorsConnectionWhere { node: PersonWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -625,20 +582,14 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort!] -} - "Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." input PersonSort { name: SortDirection @@ -648,9 +599,10 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -662,11 +614,11 @@ input PersonWhere { .Schema [source,graphql,schema=true] ---- -type Person { +type Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DELETE]) } @@ -680,8 +632,8 @@ schema { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -731,10 +683,10 @@ type PersonEdge { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } "An enum for sorting in either ascending or descending order." @@ -756,13 +708,6 @@ input MovieActorsConnectionWhere { node: PersonWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -788,20 +733,14 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort!] -} - "Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." input PersonSort { name: SortDirection @@ -811,9 +750,10 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -825,11 +765,11 @@ input PersonWhere { .Schema [source,graphql,schema=true] ---- -type Person { +type Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DISCONNECT]) } @@ -843,8 +783,8 @@ schema { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -894,10 +834,10 @@ type PersonEdge { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } "An enum for sorting in either ascending or descending order." @@ -919,13 +859,6 @@ input MovieActorsConnectionWhere { node: PersonWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -951,20 +884,14 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort!] -} - "Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." input PersonSort { name: SortDirection @@ -974,9 +901,10 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -988,11 +916,11 @@ input PersonWhere { .Schema [source,graphql,schema=true] ---- -type Person { +type Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT_OR_CREATE]) } @@ -1006,8 +934,8 @@ schema { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -1057,10 +985,10 @@ type PersonEdge { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } "An enum for sorting in either ascending or descending order." @@ -1082,13 +1010,6 @@ input MovieActorsConnectionWhere { node: PersonWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -1114,20 +1035,14 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort!] -} - "Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." input PersonSort { name: SortDirection @@ -1137,9 +1052,10 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -1151,11 +1067,11 @@ input PersonWhere { .Schema [source,graphql,schema=true] ---- -type Person { +type Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) @@ -1170,11 +1086,11 @@ schema { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID - producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! + producers(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + producersConnection(after: String, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! } type MovieActorsConnection { @@ -1234,10 +1150,10 @@ type PersonEdge { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } "An enum for sorting in either ascending or descending order." @@ -1259,13 +1175,6 @@ input MovieActorsConnectionWhere { node: PersonWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - input MovieProducersConnectionSort { node: PersonSort } @@ -1302,9 +1211,10 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID "Return Movies where all of the related MovieProducersConnections match this filter" @@ -1325,13 +1235,6 @@ input MovieWhere { producers_SOME: PersonWhere } -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort!] -} - "Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." input PersonSort { name: SortDirection @@ -1341,9 +1244,10 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -1355,11 +1259,11 @@ input PersonWhere { .Schema [source,graphql,schema=true] ---- -type Person { +type Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) @@ -1374,11 +1278,11 @@ schema { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID - producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! + producers(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + producersConnection(after: String, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! } type MovieActorsConnection { @@ -1438,10 +1342,10 @@ type PersonEdge { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } "An enum for sorting in either ascending or descending order." @@ -1463,13 +1367,6 @@ input MovieActorsConnectionWhere { node: PersonWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - input MovieProducersConnectionSort { node: PersonSort } @@ -1506,9 +1403,10 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID "Return Movies where all of the related MovieProducersConnections match this filter" @@ -1529,13 +1427,6 @@ input MovieWhere { producers_SOME: PersonWhere } -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort!] -} - "Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." input PersonSort { name: SortDirection @@ -1545,9 +1436,10 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -1561,17 +1453,17 @@ input PersonWhere { .Schema [source,graphql,schema=true] ---- -type PersonOne { +type PersonOne @node { name: String } -type PersonTwo { +type PersonTwo @node { nameTwo: String } union Person = PersonOne | PersonTwo -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: []) } @@ -1587,8 +1479,8 @@ schema { union Person = PersonOne | PersonTwo type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -1653,13 +1545,13 @@ type PersonTwosConnection { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, where: PersonWhere): [Person!]! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } "An enum for sorting in either ascending or descending order." @@ -1689,13 +1581,6 @@ input MovieActorsPersonTwoConnectionWhere { node: PersonTwoWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -1721,20 +1606,14 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - "Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." input PersonOneSort { name: SortDirection @@ -1744,20 +1623,14 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - "Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." input PersonTwoSort { nameTwo: SortDirection @@ -1767,9 +1640,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - nameTwo: String + nameTwo: String @deprecated(reason : "Please use the explicit _EQ version") nameTwo_CONTAINS: String nameTwo_ENDS_WITH: String + nameTwo_EQ: String nameTwo_IN: [String] nameTwo_STARTS_WITH: String } @@ -1779,12 +1653,6 @@ input PersonWhere { PersonTwo: PersonTwoWhere } -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - ---- === Single relationship with nested operation CREATE specified @@ -1792,17 +1660,17 @@ input QueryOptions { .Schema [source,graphql,schema=true] ---- -type PersonOne { +type PersonOne @node { name: String } -type PersonTwo { +type PersonTwo @node { nameTwo: String } union Person = PersonOne | PersonTwo -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) } @@ -1818,8 +1686,8 @@ schema { union Person = PersonOne | PersonTwo type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -1884,13 +1752,13 @@ type PersonTwosConnection { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, where: PersonWhere): [Person!]! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } "An enum for sorting in either ascending or descending order." @@ -1920,13 +1788,6 @@ input MovieActorsPersonTwoConnectionWhere { node: PersonTwoWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -1952,20 +1813,14 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - "Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." input PersonOneSort { name: SortDirection @@ -1975,20 +1830,14 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - "Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." input PersonTwoSort { nameTwo: SortDirection @@ -1998,9 +1847,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - nameTwo: String + nameTwo: String @deprecated(reason : "Please use the explicit _EQ version") nameTwo_CONTAINS: String nameTwo_ENDS_WITH: String + nameTwo_EQ: String nameTwo_IN: [String] nameTwo_STARTS_WITH: String } @@ -2010,12 +1860,6 @@ input PersonWhere { PersonTwo: PersonTwoWhere } -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - ---- === Single relationship with nested operation CONNECT specified @@ -2023,17 +1867,17 @@ input QueryOptions { .Schema [source,graphql,schema=true] ---- -type PersonOne { +type PersonOne @node { name: String } -type PersonTwo { +type PersonTwo @node { nameTwo: String } union Person = PersonOne | PersonTwo -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT]) } @@ -2049,8 +1893,8 @@ schema { union Person = PersonOne | PersonTwo type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -2115,13 +1959,13 @@ type PersonTwosConnection { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, where: PersonWhere): [Person!]! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } "An enum for sorting in either ascending or descending order." @@ -2151,13 +1995,6 @@ input MovieActorsPersonTwoConnectionWhere { node: PersonTwoWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -2183,20 +2020,14 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - "Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." input PersonOneSort { name: SortDirection @@ -2206,20 +2037,14 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - "Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." input PersonTwoSort { nameTwo: SortDirection @@ -2229,9 +2054,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - nameTwo: String + nameTwo: String @deprecated(reason : "Please use the explicit _EQ version") nameTwo_CONTAINS: String nameTwo_ENDS_WITH: String + nameTwo_EQ: String nameTwo_IN: [String] nameTwo_STARTS_WITH: String } @@ -2241,12 +2067,6 @@ input PersonWhere { PersonTwo: PersonTwoWhere } -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - ---- === Single relationship with nested operation UPDATE specified @@ -2254,17 +2074,17 @@ input QueryOptions { .Schema [source,graphql,schema=true] ---- -type PersonOne { +type PersonOne @node { name: String } -type PersonTwo { +type PersonTwo @node { nameTwo: String } union Person = PersonOne | PersonTwo -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [UPDATE]) } @@ -2280,8 +2100,8 @@ schema { union Person = PersonOne | PersonTwo type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -2346,13 +2166,13 @@ type PersonTwosConnection { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, where: PersonWhere): [Person!]! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } "An enum for sorting in either ascending or descending order." @@ -2382,13 +2202,6 @@ input MovieActorsPersonTwoConnectionWhere { node: PersonTwoWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -2414,20 +2227,14 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - "Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." input PersonOneSort { name: SortDirection @@ -2437,20 +2244,14 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - "Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." input PersonTwoSort { nameTwo: SortDirection @@ -2460,9 +2261,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - nameTwo: String + nameTwo: String @deprecated(reason : "Please use the explicit _EQ version") nameTwo_CONTAINS: String nameTwo_ENDS_WITH: String + nameTwo_EQ: String nameTwo_IN: [String] nameTwo_STARTS_WITH: String } @@ -2472,12 +2274,6 @@ input PersonWhere { PersonTwo: PersonTwoWhere } -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - ---- === Single relationship with nested operation DELETE specified @@ -2485,17 +2281,17 @@ input QueryOptions { .Schema [source,graphql,schema=true] ---- -type PersonOne { +type PersonOne @node { name: String } -type PersonTwo { +type PersonTwo @node { nameTwo: String } union Person = PersonOne | PersonTwo -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DELETE]) } @@ -2511,8 +2307,8 @@ schema { union Person = PersonOne | PersonTwo type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -2577,13 +2373,13 @@ type PersonTwosConnection { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, where: PersonWhere): [Person!]! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } "An enum for sorting in either ascending or descending order." @@ -2613,13 +2409,6 @@ input MovieActorsPersonTwoConnectionWhere { node: PersonTwoWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -2645,20 +2434,14 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - "Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." input PersonOneSort { name: SortDirection @@ -2668,20 +2451,14 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - "Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." input PersonTwoSort { nameTwo: SortDirection @@ -2691,9 +2468,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - nameTwo: String + nameTwo: String @deprecated(reason : "Please use the explicit _EQ version") nameTwo_CONTAINS: String nameTwo_ENDS_WITH: String + nameTwo_EQ: String nameTwo_IN: [String] nameTwo_STARTS_WITH: String } @@ -2703,12 +2481,6 @@ input PersonWhere { PersonTwo: PersonTwoWhere } -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - ---- === Single relationship with nested operation DISCONNECT specified @@ -2716,17 +2488,17 @@ input QueryOptions { .Schema [source,graphql,schema=true] ---- -type PersonOne { +type PersonOne @node { name: String } -type PersonTwo { +type PersonTwo @node { nameTwo: String } union Person = PersonOne | PersonTwo -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DISCONNECT]) } @@ -2742,8 +2514,8 @@ schema { union Person = PersonOne | PersonTwo type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -2808,13 +2580,13 @@ type PersonTwosConnection { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, where: PersonWhere): [Person!]! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } "An enum for sorting in either ascending or descending order." @@ -2844,13 +2616,6 @@ input MovieActorsPersonTwoConnectionWhere { node: PersonTwoWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -2876,20 +2641,14 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - "Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." input PersonOneSort { name: SortDirection @@ -2899,20 +2658,14 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - "Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." input PersonTwoSort { nameTwo: SortDirection @@ -2922,9 +2675,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - nameTwo: String + nameTwo: String @deprecated(reason : "Please use the explicit _EQ version") nameTwo_CONTAINS: String nameTwo_ENDS_WITH: String + nameTwo_EQ: String nameTwo_IN: [String] nameTwo_STARTS_WITH: String } @@ -2934,12 +2688,6 @@ input PersonWhere { PersonTwo: PersonTwoWhere } -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - ---- === Should not generate any nested operations if only CONNECT_OR_CREATE is specified and the related type does not have a unique field @@ -2947,17 +2695,17 @@ input QueryOptions { .Schema [source,graphql,schema=true] ---- -type PersonOne { +type PersonOne @node { name: String } -type PersonTwo { +type PersonTwo @node { nameTwo: String } union Person = PersonOne | PersonTwo -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT_OR_CREATE]) } @@ -2973,8 +2721,8 @@ schema { union Person = PersonOne | PersonTwo type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -3039,13 +2787,13 @@ type PersonTwosConnection { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, where: PersonWhere): [Person!]! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } "An enum for sorting in either ascending or descending order." @@ -3075,13 +2823,6 @@ input MovieActorsPersonTwoConnectionWhere { node: PersonTwoWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -3107,20 +2848,14 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - "Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." input PersonOneSort { name: SortDirection @@ -3130,20 +2865,14 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - "Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." input PersonTwoSort { nameTwo: SortDirection @@ -3153,9 +2882,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - nameTwo: String + nameTwo: String @deprecated(reason : "Please use the explicit _EQ version") nameTwo_CONTAINS: String nameTwo_ENDS_WITH: String + nameTwo_EQ: String nameTwo_IN: [String] nameTwo_STARTS_WITH: String } @@ -3165,12 +2895,6 @@ input PersonWhere { PersonTwo: PersonTwoWhere } -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - ---- === Two relationships with nested operations specified on one @@ -3178,17 +2902,17 @@ input QueryOptions { .Schema [source,graphql,schema=true] ---- -type PersonOne { +type PersonOne @node { name: String } -type PersonTwo { +type PersonTwo @node { nameTwo: String } union Person = PersonOne | PersonTwo -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) @@ -3205,11 +2929,11 @@ schema { union Person = PersonOne | PersonTwo type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID - producers(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, where: MovieProducersConnectionWhere): MovieProducersConnection! + producers(limit: Int, offset: Int, where: PersonWhere): [Person!]! + producersConnection(after: String, first: Int, where: MovieProducersConnectionWhere): MovieProducersConnection! } type MovieActorsConnection { @@ -3284,13 +3008,13 @@ type PersonTwosConnection { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, where: PersonWhere): [Person!]! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } "An enum for sorting in either ascending or descending order." @@ -3320,13 +3044,6 @@ input MovieActorsPersonTwoConnectionWhere { node: PersonTwoWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - input MovieProducersConnectionWhere { PersonOne: MovieProducersPersonOneConnectionWhere PersonTwo: MovieProducersPersonTwoConnectionWhere @@ -3371,9 +3088,10 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID "Return Movies where all of the related MovieProducersConnections match this filter" @@ -3394,13 +3112,6 @@ input MovieWhere { producers_SOME: PersonWhere } -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - "Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." input PersonOneSort { name: SortDirection @@ -3410,20 +3121,14 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - "Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." input PersonTwoSort { nameTwo: SortDirection @@ -3433,9 +3138,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - nameTwo: String + nameTwo: String @deprecated(reason : "Please use the explicit _EQ version") nameTwo_CONTAINS: String nameTwo_ENDS_WITH: String + nameTwo_EQ: String nameTwo_IN: [String] nameTwo_STARTS_WITH: String } @@ -3445,12 +3151,6 @@ input PersonWhere { PersonTwo: PersonTwoWhere } -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - ---- === Two relationships with nested operations specified on both @@ -3458,17 +3158,17 @@ input QueryOptions { .Schema [source,graphql,schema=true] ---- -type PersonOne { +type PersonOne @node { name: String } -type PersonTwo { +type PersonTwo @node { nameTwo: String } union Person = PersonOne | PersonTwo -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) @@ -3485,11 +3185,11 @@ schema { union Person = PersonOne | PersonTwo type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID - producers(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, where: MovieProducersConnectionWhere): MovieProducersConnection! + producers(limit: Int, offset: Int, where: PersonWhere): [Person!]! + producersConnection(after: String, first: Int, where: MovieProducersConnectionWhere): MovieProducersConnection! } type MovieActorsConnection { @@ -3564,13 +3264,13 @@ type PersonTwosConnection { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, where: PersonWhere): [Person!]! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } "An enum for sorting in either ascending or descending order." @@ -3600,13 +3300,6 @@ input MovieActorsPersonTwoConnectionWhere { node: PersonTwoWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - input MovieProducersConnectionWhere { PersonOne: MovieProducersPersonOneConnectionWhere PersonTwo: MovieProducersPersonTwoConnectionWhere @@ -3651,9 +3344,10 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID "Return Movies where all of the related MovieProducersConnections match this filter" @@ -3674,13 +3368,6 @@ input MovieWhere { producers_SOME: PersonWhere } -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - "Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." input PersonOneSort { name: SortDirection @@ -3690,20 +3377,14 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - "Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." input PersonTwoSort { nameTwo: SortDirection @@ -3713,9 +3394,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - nameTwo: String + nameTwo: String @deprecated(reason : "Please use the explicit _EQ version") nameTwo_CONTAINS: String nameTwo_ENDS_WITH: String + nameTwo_EQ: String nameTwo_IN: [String] nameTwo_STARTS_WITH: String } @@ -3725,12 +3407,6 @@ input PersonWhere { PersonTwo: PersonTwoWhere } -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - ---- == Related to an interface type @@ -3744,16 +3420,16 @@ interface Person { name: String } -type PersonOne implements Person { +type PersonOne implements Person @node { name: String someExtraProp: [Int!]! } -type PersonTwo implements Person { +type PersonTwo implements Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: []) } @@ -3771,8 +3447,8 @@ interface Person { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -3849,14 +3525,14 @@ type PersonTwosConnection { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } enum PersonImplementation { @@ -3883,13 +3559,6 @@ input MovieActorsConnectionWhere { node: PersonWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -3915,20 +3584,14 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - "Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." input PersonOneSort { name: SortDirection @@ -3938,34 +3601,22 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - someExtraProp: [Int!] + someExtraProp: [Int!] @deprecated(reason : "Please use the explicit _EQ version") + someExtraProp_EQ: [Int!] someExtraProp_INCLUDES: Int } -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort] -} - "Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." input PersonSort { name: SortDirection } -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - "Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." input PersonTwoSort { name: SortDirection @@ -3975,9 +3626,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -3986,12 +3638,13 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] } ---- @@ -4005,16 +3658,16 @@ interface Person { name: String } -type PersonOne implements Person { +type PersonOne implements Person @node { name: String someExtraProp: [Int!]! } -type PersonTwo implements Person { +type PersonTwo implements Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) } @@ -4032,8 +3685,8 @@ interface Person { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -4110,14 +3763,14 @@ type PersonTwosConnection { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } enum PersonImplementation { @@ -4144,13 +3797,6 @@ input MovieActorsConnectionWhere { node: PersonWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -4176,20 +3822,14 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - "Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." input PersonOneSort { name: SortDirection @@ -4199,34 +3839,22 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - someExtraProp: [Int!] + someExtraProp: [Int!] @deprecated(reason : "Please use the explicit _EQ version") + someExtraProp_EQ: [Int!] someExtraProp_INCLUDES: Int } -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort] -} - "Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." input PersonSort { name: SortDirection } -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - "Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." input PersonTwoSort { name: SortDirection @@ -4236,9 +3864,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -4247,12 +3876,13 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] } ---- @@ -4266,16 +3896,16 @@ interface Person { name: String } -type PersonOne implements Person { +type PersonOne implements Person @node { name: String someExtraProp: [Int!]! } -type PersonTwo implements Person { +type PersonTwo implements Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT]) } @@ -4293,8 +3923,8 @@ interface Person { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -4371,14 +4001,14 @@ type PersonTwosConnection { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } enum PersonImplementation { @@ -4405,13 +4035,6 @@ input MovieActorsConnectionWhere { node: PersonWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -4437,20 +4060,14 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - "Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." input PersonOneSort { name: SortDirection @@ -4460,34 +4077,22 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - someExtraProp: [Int!] + someExtraProp: [Int!] @deprecated(reason : "Please use the explicit _EQ version") + someExtraProp_EQ: [Int!] someExtraProp_INCLUDES: Int } -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort] -} - "Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." input PersonSort { name: SortDirection } -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - "Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." input PersonTwoSort { name: SortDirection @@ -4497,9 +4102,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -4508,12 +4114,13 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] } ---- @@ -4527,16 +4134,16 @@ interface Person { name: String } -type PersonOne implements Person { +type PersonOne implements Person @node { name: String someExtraProp: [Int!]! } -type PersonTwo implements Person { +type PersonTwo implements Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [UPDATE]) } @@ -4554,8 +4161,8 @@ interface Person { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -4632,14 +4239,14 @@ type PersonTwosConnection { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } enum PersonImplementation { @@ -4666,13 +4273,6 @@ input MovieActorsConnectionWhere { node: PersonWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -4698,20 +4298,14 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - "Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." input PersonOneSort { name: SortDirection @@ -4721,34 +4315,22 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - someExtraProp: [Int!] + someExtraProp: [Int!] @deprecated(reason : "Please use the explicit _EQ version") + someExtraProp_EQ: [Int!] someExtraProp_INCLUDES: Int } -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort] -} - "Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." input PersonSort { name: SortDirection } -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - "Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." input PersonTwoSort { name: SortDirection @@ -4758,9 +4340,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -4769,12 +4352,13 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] } ---- @@ -4788,16 +4372,16 @@ interface Person { name: String } -type PersonOne implements Person { +type PersonOne implements Person @node { name: String someExtraProp: [Int!]! } -type PersonTwo implements Person { +type PersonTwo implements Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DELETE]) } @@ -4815,8 +4399,8 @@ interface Person { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -4893,14 +4477,14 @@ type PersonTwosConnection { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } enum PersonImplementation { @@ -4927,13 +4511,6 @@ input MovieActorsConnectionWhere { node: PersonWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -4959,20 +4536,14 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - "Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." input PersonOneSort { name: SortDirection @@ -4982,34 +4553,22 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - someExtraProp: [Int!] + someExtraProp: [Int!] @deprecated(reason : "Please use the explicit _EQ version") + someExtraProp_EQ: [Int!] someExtraProp_INCLUDES: Int } -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort] -} - "Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." input PersonSort { name: SortDirection } -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - "Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." input PersonTwoSort { name: SortDirection @@ -5019,9 +4578,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -5030,12 +4590,13 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] } ---- @@ -5049,16 +4610,16 @@ interface Person { name: String } -type PersonOne implements Person { +type PersonOne implements Person @node { name: String someExtraProp: [Int!]! } -type PersonTwo implements Person { +type PersonTwo implements Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DISCONNECT]) } @@ -5076,8 +4637,8 @@ interface Person { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -5154,14 +4715,14 @@ type PersonTwosConnection { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } enum PersonImplementation { @@ -5188,13 +4749,6 @@ input MovieActorsConnectionWhere { node: PersonWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -5220,20 +4774,14 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - "Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." input PersonOneSort { name: SortDirection @@ -5243,34 +4791,22 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - someExtraProp: [Int!] + someExtraProp: [Int!] @deprecated(reason : "Please use the explicit _EQ version") + someExtraProp_EQ: [Int!] someExtraProp_INCLUDES: Int } -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort] -} - "Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." input PersonSort { name: SortDirection } -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - "Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." input PersonTwoSort { name: SortDirection @@ -5280,9 +4816,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -5291,12 +4828,13 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] } ---- @@ -5310,16 +4848,16 @@ interface Person { name: String } -type PersonOne implements Person { +type PersonOne implements Person @node { name: String someExtraProp: [Int!]! } -type PersonTwo implements Person { +type PersonTwo implements Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) @@ -5338,11 +4876,11 @@ interface Person { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID - producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! + producers(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + producersConnection(after: String, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! } type MovieActorsConnection { @@ -5429,14 +4967,14 @@ type PersonTwosConnection { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } enum PersonImplementation { @@ -5463,13 +5001,6 @@ input MovieActorsConnectionWhere { node: PersonWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - input MovieProducersConnectionSort { node: PersonSort } @@ -5506,9 +5037,10 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID "Return Movies where all of the related MovieProducersConnections match this filter" @@ -5529,13 +5061,6 @@ input MovieWhere { producers_SOME: PersonWhere } -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - "Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." input PersonOneSort { name: SortDirection @@ -5545,34 +5070,22 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - someExtraProp: [Int!] + someExtraProp: [Int!] @deprecated(reason : "Please use the explicit _EQ version") + someExtraProp_EQ: [Int!] someExtraProp_INCLUDES: Int } -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort] -} - "Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." input PersonSort { name: SortDirection } -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - "Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." input PersonTwoSort { name: SortDirection @@ -5582,9 +5095,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -5593,12 +5107,13 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] } ---- @@ -5612,16 +5127,16 @@ interface Person { name: String } -type PersonOne implements Person { +type PersonOne implements Person @node { name: String someExtraProp: [Int!]! } -type PersonTwo implements Person { +type PersonTwo implements Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE, DELETE]) producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) @@ -5640,11 +5155,11 @@ interface Person { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID - producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! + producers(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + producersConnection(after: String, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! } type MovieActorsConnection { @@ -5731,14 +5246,14 @@ type PersonTwosConnection { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } enum PersonImplementation { @@ -5765,13 +5280,6 @@ input MovieActorsConnectionWhere { node: PersonWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - input MovieProducersConnectionSort { node: PersonSort } @@ -5808,9 +5316,10 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID "Return Movies where all of the related MovieProducersConnections match this filter" @@ -5831,13 +5340,6 @@ input MovieWhere { producers_SOME: PersonWhere } -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - "Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." input PersonOneSort { name: SortDirection @@ -5847,34 +5349,22 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - someExtraProp: [Int!] + someExtraProp: [Int!] @deprecated(reason : "Please use the explicit _EQ version") + someExtraProp_EQ: [Int!] someExtraProp_INCLUDES: Int } -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort] -} - "Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." input PersonSort { name: SortDirection } -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - "Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." input PersonTwoSort { name: SortDirection @@ -5884,9 +5374,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -5895,12 +5386,13 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] } ---- diff --git a/core/src/test/resources/tck-test-files/schema/v2/directives/relationship-nested-operations.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/directives/relationship-nested-operations.js.adoc index 0589c83f..f9069e82 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/directives/relationship-nested-operations.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/directives/relationship-nested-operations.js.adoc @@ -11,11 +11,11 @@ .Schema [source,graphql,schema=true] ---- -type Person { +type Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: []) } @@ -29,8 +29,8 @@ schema { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -61,15 +61,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -105,9 +96,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -141,15 +133,6 @@ type PersonEdge { node: Person! } -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort!] -} - """ Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. """ @@ -161,18 +144,19 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } """An enum for sorting in either ascending or descending order.""" @@ -189,11 +173,11 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Person { +type Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) } @@ -207,8 +191,8 @@ schema { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -239,15 +223,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -283,9 +258,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -319,15 +295,6 @@ type PersonEdge { node: Person! } -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort!] -} - """ Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. """ @@ -339,18 +306,19 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } """An enum for sorting in either ascending or descending order.""" @@ -367,11 +335,11 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Person { +type Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT]) } @@ -385,8 +353,8 @@ schema { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -417,15 +385,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -461,9 +420,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -497,15 +457,6 @@ type PersonEdge { node: Person! } -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort!] -} - """ Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. """ @@ -517,18 +468,19 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } """An enum for sorting in either ascending or descending order.""" @@ -545,11 +497,11 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Person { +type Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [UPDATE]) } @@ -563,8 +515,8 @@ schema { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -595,15 +547,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -639,9 +582,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -675,15 +619,6 @@ type PersonEdge { node: Person! } -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort!] -} - """ Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. """ @@ -695,18 +630,19 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } """An enum for sorting in either ascending or descending order.""" @@ -723,11 +659,11 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Person { +type Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DELETE]) } @@ -741,8 +677,8 @@ schema { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -773,15 +709,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -817,9 +744,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -853,15 +781,6 @@ type PersonEdge { node: Person! } -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort!] -} - """ Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. """ @@ -873,18 +792,19 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } """An enum for sorting in either ascending or descending order.""" @@ -901,11 +821,11 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Person { +type Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DISCONNECT]) } @@ -919,8 +839,8 @@ schema { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -951,15 +871,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -995,9 +906,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -1031,15 +943,6 @@ type PersonEdge { node: Person! } -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort!] -} - """ Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. """ @@ -1051,18 +954,19 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } """An enum for sorting in either ascending or descending order.""" @@ -1079,11 +983,11 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Person { +type Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT_OR_CREATE]) } @@ -1097,8 +1001,8 @@ schema { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -1129,15 +1033,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -1173,9 +1068,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -1209,15 +1105,6 @@ type PersonEdge { node: Person! } -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort!] -} - """ Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. """ @@ -1229,18 +1116,19 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } """An enum for sorting in either ascending or descending order.""" @@ -1257,11 +1145,11 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Person { +type Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) @@ -1276,11 +1164,11 @@ schema { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID - producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! + producers(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + producersConnection(after: String, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! } type MovieActorsConnection { @@ -1310,15 +1198,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - type MovieProducersConnection { edges: [MovieProducersRelationship!]! pageInfo: PageInfo! @@ -1376,9 +1255,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID """ @@ -1436,15 +1316,6 @@ type PersonEdge { node: Person! } -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort!] -} - """ Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. """ @@ -1456,18 +1327,19 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } """An enum for sorting in either ascending or descending order.""" @@ -1484,11 +1356,11 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Person { +type Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) @@ -1503,11 +1375,11 @@ schema { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID - producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! + producers(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + producersConnection(after: String, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! } type MovieActorsConnection { @@ -1537,15 +1409,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - type MovieProducersConnection { edges: [MovieProducersRelationship!]! pageInfo: PageInfo! @@ -1603,9 +1466,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID """ @@ -1663,15 +1527,6 @@ type PersonEdge { node: Person! } -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort!] -} - """ Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. """ @@ -1683,18 +1538,19 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } """An enum for sorting in either ascending or descending order.""" @@ -1713,17 +1569,17 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type PersonOne { +type PersonOne @node { name: String } -type PersonTwo { +type PersonTwo @node { nameTwo: String } union Person = PersonOne | PersonTwo -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: []) } @@ -1737,8 +1593,8 @@ schema { } type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -1777,15 +1633,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -1821,9 +1668,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -1853,15 +1701,6 @@ type PersonOneEdge { node: PersonOne! } -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - """ Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. """ @@ -1873,9 +1712,10 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -1895,15 +1735,6 @@ type PersonTwoEdge { node: PersonTwo! } -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - """ Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. """ @@ -1915,9 +1746,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - nameTwo: String + nameTwo: String @deprecated(reason: "Please use the explicit _EQ version") nameTwo_CONTAINS: String nameTwo_ENDS_WITH: String + nameTwo_EQ: String nameTwo_IN: [String] nameTwo_STARTS_WITH: String } @@ -1934,19 +1766,13 @@ input PersonWhere { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, where: PersonWhere): [Person!]! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } """An enum for sorting in either ascending or descending order.""" @@ -1963,17 +1789,17 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type PersonOne { +type PersonOne @node { name: String } -type PersonTwo { +type PersonTwo @node { nameTwo: String } union Person = PersonOne | PersonTwo -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) } @@ -1987,8 +1813,8 @@ schema { } type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -2027,15 +1853,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -2071,9 +1888,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -2103,15 +1921,6 @@ type PersonOneEdge { node: PersonOne! } -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - """ Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. """ @@ -2123,9 +1932,10 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -2145,15 +1955,6 @@ type PersonTwoEdge { node: PersonTwo! } -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - """ Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. """ @@ -2165,9 +1966,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - nameTwo: String + nameTwo: String @deprecated(reason: "Please use the explicit _EQ version") nameTwo_CONTAINS: String nameTwo_ENDS_WITH: String + nameTwo_EQ: String nameTwo_IN: [String] nameTwo_STARTS_WITH: String } @@ -2184,19 +1986,13 @@ input PersonWhere { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, where: PersonWhere): [Person!]! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } """An enum for sorting in either ascending or descending order.""" @@ -2213,17 +2009,17 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type PersonOne { +type PersonOne @node { name: String } -type PersonTwo { +type PersonTwo @node { nameTwo: String } union Person = PersonOne | PersonTwo -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT]) } @@ -2237,8 +2033,8 @@ schema { } type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -2277,15 +2073,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -2321,9 +2108,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -2353,15 +2141,6 @@ type PersonOneEdge { node: PersonOne! } -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - """ Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. """ @@ -2373,9 +2152,10 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -2395,15 +2175,6 @@ type PersonTwoEdge { node: PersonTwo! } -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - """ Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. """ @@ -2415,9 +2186,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - nameTwo: String + nameTwo: String @deprecated(reason: "Please use the explicit _EQ version") nameTwo_CONTAINS: String nameTwo_ENDS_WITH: String + nameTwo_EQ: String nameTwo_IN: [String] nameTwo_STARTS_WITH: String } @@ -2434,19 +2206,13 @@ input PersonWhere { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, where: PersonWhere): [Person!]! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } """An enum for sorting in either ascending or descending order.""" @@ -2463,17 +2229,17 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type PersonOne { +type PersonOne @node { name: String } -type PersonTwo { +type PersonTwo @node { nameTwo: String } union Person = PersonOne | PersonTwo -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [UPDATE]) } @@ -2487,8 +2253,8 @@ schema { } type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -2527,15 +2293,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -2571,9 +2328,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -2603,15 +2361,6 @@ type PersonOneEdge { node: PersonOne! } -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - """ Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. """ @@ -2623,9 +2372,10 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -2645,15 +2395,6 @@ type PersonTwoEdge { node: PersonTwo! } -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - """ Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. """ @@ -2665,9 +2406,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - nameTwo: String + nameTwo: String @deprecated(reason: "Please use the explicit _EQ version") nameTwo_CONTAINS: String nameTwo_ENDS_WITH: String + nameTwo_EQ: String nameTwo_IN: [String] nameTwo_STARTS_WITH: String } @@ -2684,19 +2426,13 @@ input PersonWhere { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, where: PersonWhere): [Person!]! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } """An enum for sorting in either ascending or descending order.""" @@ -2713,17 +2449,17 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type PersonOne { +type PersonOne @node { name: String } -type PersonTwo { +type PersonTwo @node { nameTwo: String } union Person = PersonOne | PersonTwo -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DELETE]) } @@ -2737,8 +2473,8 @@ schema { } type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -2777,15 +2513,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -2821,9 +2548,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -2853,15 +2581,6 @@ type PersonOneEdge { node: PersonOne! } -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - """ Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. """ @@ -2873,9 +2592,10 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -2895,15 +2615,6 @@ type PersonTwoEdge { node: PersonTwo! } -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - """ Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. """ @@ -2915,9 +2626,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - nameTwo: String + nameTwo: String @deprecated(reason: "Please use the explicit _EQ version") nameTwo_CONTAINS: String nameTwo_ENDS_WITH: String + nameTwo_EQ: String nameTwo_IN: [String] nameTwo_STARTS_WITH: String } @@ -2934,19 +2646,13 @@ input PersonWhere { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, where: PersonWhere): [Person!]! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } """An enum for sorting in either ascending or descending order.""" @@ -2963,17 +2669,17 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type PersonOne { +type PersonOne @node { name: String } -type PersonTwo { +type PersonTwo @node { nameTwo: String } union Person = PersonOne | PersonTwo -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DISCONNECT]) } @@ -2987,8 +2693,8 @@ schema { } type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -3027,15 +2733,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -3071,9 +2768,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -3103,15 +2801,6 @@ type PersonOneEdge { node: PersonOne! } -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - """ Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. """ @@ -3123,9 +2812,10 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -3145,15 +2835,6 @@ type PersonTwoEdge { node: PersonTwo! } -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - """ Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. """ @@ -3165,9 +2846,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - nameTwo: String + nameTwo: String @deprecated(reason: "Please use the explicit _EQ version") nameTwo_CONTAINS: String nameTwo_ENDS_WITH: String + nameTwo_EQ: String nameTwo_IN: [String] nameTwo_STARTS_WITH: String } @@ -3184,19 +2866,13 @@ input PersonWhere { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, where: PersonWhere): [Person!]! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } """An enum for sorting in either ascending or descending order.""" @@ -3213,17 +2889,17 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type PersonOne { +type PersonOne @node { name: String } -type PersonTwo { +type PersonTwo @node { nameTwo: String } union Person = PersonOne | PersonTwo -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT_OR_CREATE]) } @@ -3237,8 +2913,8 @@ schema { } type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -3277,15 +2953,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -3321,9 +2988,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -3353,15 +3021,6 @@ type PersonOneEdge { node: PersonOne! } -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - """ Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. """ @@ -3373,9 +3032,10 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -3395,15 +3055,6 @@ type PersonTwoEdge { node: PersonTwo! } -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - """ Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. """ @@ -3415,9 +3066,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - nameTwo: String + nameTwo: String @deprecated(reason: "Please use the explicit _EQ version") nameTwo_CONTAINS: String nameTwo_ENDS_WITH: String + nameTwo_EQ: String nameTwo_IN: [String] nameTwo_STARTS_WITH: String } @@ -3434,19 +3086,13 @@ input PersonWhere { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, where: PersonWhere): [Person!]! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } """An enum for sorting in either ascending or descending order.""" @@ -3463,17 +3109,17 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type PersonOne { +type PersonOne @node { name: String } -type PersonTwo { +type PersonTwo @node { nameTwo: String } union Person = PersonOne | PersonTwo -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) @@ -3488,11 +3134,11 @@ schema { } type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID - producers(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, where: MovieProducersConnectionWhere): MovieProducersConnection! + producers(limit: Int, offset: Int, where: PersonWhere): [Person!]! + producersConnection(after: String, first: Int, where: MovieProducersConnectionWhere): MovieProducersConnection! } type MovieActorsConnection { @@ -3530,15 +3176,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - type MovieProducersConnection { edges: [MovieProducersRelationship!]! pageInfo: PageInfo! @@ -3604,9 +3241,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID """ @@ -3660,15 +3298,6 @@ type PersonOneEdge { node: PersonOne! } -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - """ Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. """ @@ -3680,9 +3309,10 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -3702,15 +3332,6 @@ type PersonTwoEdge { node: PersonTwo! } -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - """ Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. """ @@ -3722,9 +3343,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - nameTwo: String + nameTwo: String @deprecated(reason: "Please use the explicit _EQ version") nameTwo_CONTAINS: String nameTwo_ENDS_WITH: String + nameTwo_EQ: String nameTwo_IN: [String] nameTwo_STARTS_WITH: String } @@ -3741,19 +3363,13 @@ input PersonWhere { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, where: PersonWhere): [Person!]! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } """An enum for sorting in either ascending or descending order.""" @@ -3770,17 +3386,17 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type PersonOne { +type PersonOne @node { name: String } -type PersonTwo { +type PersonTwo @node { nameTwo: String } union Person = PersonOne | PersonTwo -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) @@ -3795,11 +3411,11 @@ schema { } type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID - producers(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, where: MovieProducersConnectionWhere): MovieProducersConnection! + producers(limit: Int, offset: Int, where: PersonWhere): [Person!]! + producersConnection(after: String, first: Int, where: MovieProducersConnectionWhere): MovieProducersConnection! } type MovieActorsConnection { @@ -3837,15 +3453,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - type MovieProducersConnection { edges: [MovieProducersRelationship!]! pageInfo: PageInfo! @@ -3911,9 +3518,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID """ @@ -3967,15 +3575,6 @@ type PersonOneEdge { node: PersonOne! } -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - """ Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. """ @@ -3987,9 +3586,10 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -4009,15 +3609,6 @@ type PersonTwoEdge { node: PersonTwo! } -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - """ Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. """ @@ -4029,9 +3620,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - nameTwo: String + nameTwo: String @deprecated(reason: "Please use the explicit _EQ version") nameTwo_CONTAINS: String nameTwo_ENDS_WITH: String + nameTwo_EQ: String nameTwo_IN: [String] nameTwo_STARTS_WITH: String } @@ -4048,19 +3640,13 @@ input PersonWhere { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, where: PersonWhere): [Person!]! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } """An enum for sorting in either ascending or descending order.""" @@ -4083,16 +3669,16 @@ interface Person { name: String } -type PersonOne implements Person { +type PersonOne implements Person @node { name: String someExtraProp: [Int!]! } -type PersonTwo implements Person { +type PersonTwo implements Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: []) } @@ -4106,8 +3692,8 @@ schema { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -4138,15 +3724,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -4182,9 +3759,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -4233,15 +3811,6 @@ type PersonOneEdge { node: PersonOne! } -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - """ Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. """ @@ -4253,12 +3822,14 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - someExtraProp: [Int!] + someExtraProp: [Int!] @deprecated(reason: "Please use the explicit _EQ version") + someExtraProp_EQ: [Int!] someExtraProp_INCLUDES: Int } @@ -4268,15 +3839,6 @@ type PersonOnesConnection { totalCount: Int! } -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort] -} - """ Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. """ @@ -4293,15 +3855,6 @@ type PersonTwoEdge { node: PersonTwo! } -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - """ Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. """ @@ -4313,9 +3866,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -4330,23 +3884,24 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } """An enum for sorting in either ascending or descending order.""" @@ -4367,16 +3922,16 @@ interface Person { name: String } -type PersonOne implements Person { +type PersonOne implements Person @node { name: String someExtraProp: [Int!]! } -type PersonTwo implements Person { +type PersonTwo implements Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) } @@ -4390,8 +3945,8 @@ schema { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -4422,15 +3977,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -4466,9 +4012,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -4517,15 +4064,6 @@ type PersonOneEdge { node: PersonOne! } -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - """ Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. """ @@ -4537,12 +4075,14 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - someExtraProp: [Int!] + someExtraProp: [Int!] @deprecated(reason: "Please use the explicit _EQ version") + someExtraProp_EQ: [Int!] someExtraProp_INCLUDES: Int } @@ -4552,15 +4092,6 @@ type PersonOnesConnection { totalCount: Int! } -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort] -} - """ Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. """ @@ -4577,15 +4108,6 @@ type PersonTwoEdge { node: PersonTwo! } -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - """ Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. """ @@ -4597,9 +4119,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -4614,23 +4137,24 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } """An enum for sorting in either ascending or descending order.""" @@ -4651,16 +4175,16 @@ interface Person { name: String } -type PersonOne implements Person { +type PersonOne implements Person @node { name: String someExtraProp: [Int!]! } -type PersonTwo implements Person { +type PersonTwo implements Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT]) } @@ -4674,8 +4198,8 @@ schema { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -4706,15 +4230,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -4750,9 +4265,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -4801,15 +4317,6 @@ type PersonOneEdge { node: PersonOne! } -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - """ Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. """ @@ -4821,12 +4328,14 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - someExtraProp: [Int!] + someExtraProp: [Int!] @deprecated(reason: "Please use the explicit _EQ version") + someExtraProp_EQ: [Int!] someExtraProp_INCLUDES: Int } @@ -4836,15 +4345,6 @@ type PersonOnesConnection { totalCount: Int! } -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort] -} - """ Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. """ @@ -4861,15 +4361,6 @@ type PersonTwoEdge { node: PersonTwo! } -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - """ Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. """ @@ -4881,9 +4372,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -4898,23 +4390,24 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } """An enum for sorting in either ascending or descending order.""" @@ -4935,16 +4428,16 @@ interface Person { name: String } -type PersonOne implements Person { +type PersonOne implements Person @node { name: String someExtraProp: [Int!]! } -type PersonTwo implements Person { +type PersonTwo implements Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [UPDATE]) } @@ -4958,8 +4451,8 @@ schema { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -4990,15 +4483,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -5034,9 +4518,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -5085,15 +4570,6 @@ type PersonOneEdge { node: PersonOne! } -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - """ Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. """ @@ -5105,12 +4581,14 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - someExtraProp: [Int!] + someExtraProp: [Int!] @deprecated(reason: "Please use the explicit _EQ version") + someExtraProp_EQ: [Int!] someExtraProp_INCLUDES: Int } @@ -5120,15 +4598,6 @@ type PersonOnesConnection { totalCount: Int! } -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort] -} - """ Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. """ @@ -5145,15 +4614,6 @@ type PersonTwoEdge { node: PersonTwo! } -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - """ Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. """ @@ -5165,9 +4625,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -5182,23 +4643,24 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } """An enum for sorting in either ascending or descending order.""" @@ -5219,16 +4681,16 @@ interface Person { name: String } -type PersonOne implements Person { +type PersonOne implements Person @node { name: String someExtraProp: [Int!]! } -type PersonTwo implements Person { +type PersonTwo implements Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DELETE]) } @@ -5242,8 +4704,8 @@ schema { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -5274,15 +4736,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -5318,9 +4771,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -5369,15 +4823,6 @@ type PersonOneEdge { node: PersonOne! } -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - """ Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. """ @@ -5389,12 +4834,14 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - someExtraProp: [Int!] + someExtraProp: [Int!] @deprecated(reason: "Please use the explicit _EQ version") + someExtraProp_EQ: [Int!] someExtraProp_INCLUDES: Int } @@ -5404,15 +4851,6 @@ type PersonOnesConnection { totalCount: Int! } -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort] -} - """ Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. """ @@ -5429,15 +4867,6 @@ type PersonTwoEdge { node: PersonTwo! } -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - """ Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. """ @@ -5449,9 +4878,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -5466,23 +4896,24 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } """An enum for sorting in either ascending or descending order.""" @@ -5503,16 +4934,16 @@ interface Person { name: String } -type PersonOne implements Person { +type PersonOne implements Person @node { name: String someExtraProp: [Int!]! } -type PersonTwo implements Person { +type PersonTwo implements Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DISCONNECT]) } @@ -5526,8 +4957,8 @@ schema { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -5558,15 +4989,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -5602,9 +5024,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -5653,15 +5076,6 @@ type PersonOneEdge { node: PersonOne! } -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - """ Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. """ @@ -5673,12 +5087,14 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - someExtraProp: [Int!] + someExtraProp: [Int!] @deprecated(reason: "Please use the explicit _EQ version") + someExtraProp_EQ: [Int!] someExtraProp_INCLUDES: Int } @@ -5688,15 +5104,6 @@ type PersonOnesConnection { totalCount: Int! } -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort] -} - """ Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. """ @@ -5713,15 +5120,6 @@ type PersonTwoEdge { node: PersonTwo! } -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - """ Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. """ @@ -5733,9 +5131,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -5750,23 +5149,24 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } """An enum for sorting in either ascending or descending order.""" @@ -5787,16 +5187,16 @@ interface Person { name: String } -type PersonOne implements Person { +type PersonOne implements Person @node { name: String someExtraProp: [Int!]! } -type PersonTwo implements Person { +type PersonTwo implements Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) @@ -5811,11 +5211,11 @@ schema { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID - producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! + producers(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + producersConnection(after: String, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! } type MovieActorsConnection { @@ -5845,15 +5245,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - type MovieProducersConnection { edges: [MovieProducersRelationship!]! pageInfo: PageInfo! @@ -5911,9 +5302,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID """ @@ -5986,15 +5378,6 @@ type PersonOneEdge { node: PersonOne! } -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - """ Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. """ @@ -6006,12 +5389,14 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - someExtraProp: [Int!] + someExtraProp: [Int!] @deprecated(reason: "Please use the explicit _EQ version") + someExtraProp_EQ: [Int!] someExtraProp_INCLUDES: Int } @@ -6021,15 +5406,6 @@ type PersonOnesConnection { totalCount: Int! } -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort] -} - """ Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. """ @@ -6046,15 +5422,6 @@ type PersonTwoEdge { node: PersonTwo! } -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - """ Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. """ @@ -6066,9 +5433,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -6083,23 +5451,24 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } """An enum for sorting in either ascending or descending order.""" @@ -6120,16 +5489,16 @@ interface Person { name: String } -type PersonOne implements Person { +type PersonOne implements Person @node { name: String someExtraProp: [Int!]! } -type PersonTwo implements Person { +type PersonTwo implements Person @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE, DELETE]) producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) @@ -6144,11 +5513,11 @@ schema { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID - producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! + producers(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + producersConnection(after: String, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! } type MovieActorsConnection { @@ -6178,15 +5547,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - type MovieProducersConnection { edges: [MovieProducersRelationship!]! pageInfo: PageInfo! @@ -6244,9 +5604,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID """ @@ -6319,15 +5680,6 @@ type PersonOneEdge { node: PersonOne! } -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - """ Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. """ @@ -6339,12 +5691,14 @@ input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - someExtraProp: [Int!] + someExtraProp: [Int!] @deprecated(reason: "Please use the explicit _EQ version") + someExtraProp_EQ: [Int!] someExtraProp_INCLUDES: Int } @@ -6354,15 +5708,6 @@ type PersonOnesConnection { totalCount: Int! } -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort] -} - """ Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. """ @@ -6379,15 +5724,6 @@ type PersonTwoEdge { node: PersonTwo! } -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - """ Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. """ @@ -6399,9 +5735,10 @@ input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -6416,23 +5753,24 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! + personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! + personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/directives/relationship-properties.adoc b/core/src/test/resources/tck-test-files/schema/v2/directives/relationship-properties.adoc index 6398f4a5..96643745 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/directives/relationship-properties.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/directives/relationship-properties.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") } @@ -44,8 +44,8 @@ type ActedIn { } type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! name: String! } @@ -73,8 +73,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String! } @@ -110,10 +110,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -137,14 +137,17 @@ input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - leadRole: Boolean - screenTime: Int + leadRole: Boolean @deprecated(reason : "Please use the explicit _EQ version") + leadRole_EQ: Boolean + screenTime: Int @deprecated(reason : "Please use the explicit _EQ version") + screenTime_EQ: Int screenTime_GT: Int screenTime_GTE: Int screenTime_IN: [Int!] screenTime_LT: Int screenTime_LTE: Int - startDate: Date + startDate: Date @deprecated(reason : "Please use the explicit _EQ version") + startDate_EQ: Date startDate_GT: Date startDate_GTE: Date startDate_IN: [Date!] @@ -165,13 +168,6 @@ input ActorMoviesConnectionWhere { node: MovieWhere } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { name: SortDirection @@ -197,9 +193,10 @@ input ActorWhere { movies_SINGLE: MovieWhere "Return Actors where some of the related Movies match this filter" movies_SOME: MovieWhere - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } @@ -217,13 +214,6 @@ input MovieActorsConnectionWhere { node: ActorWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { title: SortDirection @@ -249,9 +239,10 @@ input MovieWhere { actors_SINGLE: ActorWhere "Return Movies where some of the related Actors match this filter" actors_SOME: ActorWhere - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } diff --git a/core/src/test/resources/tck-test-files/schema/v2/directives/relationship-properties.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/directives/relationship-properties.js.adoc index ddeab8fa..fc5144ec 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/directives/relationship-properties.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/directives/relationship-properties.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String! movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } -type Movie { +type Movie @node { title: String! actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") } @@ -54,14 +54,17 @@ input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - leadRole: Boolean - screenTime: Int + leadRole: Boolean @deprecated(reason: "Please use the explicit _EQ version") + leadRole_EQ: Boolean + screenTime: Int @deprecated(reason: "Please use the explicit _EQ version") + screenTime_EQ: Int screenTime_GT: Int screenTime_GTE: Int screenTime_IN: [Int!] screenTime_LT: Int screenTime_LTE: Int - startDate: Date + startDate: Date @deprecated(reason: "Please use the explicit _EQ version") + startDate_EQ: Date startDate_GT: Date startDate_GTE: Date startDate_IN: [Date!] @@ -70,8 +73,8 @@ input ActedInWhere { } type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! name: String! } @@ -105,15 +108,6 @@ type ActorMoviesRelationship { properties: ActedIn! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -149,9 +143,10 @@ input ActorWhere { movies_SINGLE: MovieWhere """Return Actors where some of the related Movies match this filter""" movies_SOME: MovieWhere - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } @@ -166,8 +161,8 @@ type ActorsConnection { scalar Date type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String! } @@ -201,15 +196,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -245,9 +231,10 @@ input MovieWhere { actors_SINGLE: ActorWhere """Return Movies where some of the related Actors match this filter""" actors_SOME: ActorWhere - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } @@ -267,10 +254,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/directives/relationship.adoc b/core/src/test/resources/tck-test-files/schema/v2/directives/relationship.adoc index 65208785..1a4ed18c 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/directives/relationship.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/directives/relationship.adoc @@ -8,11 +8,11 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } @@ -41,8 +41,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -77,10 +77,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -91,13 +91,6 @@ enum SortDirection { DESC } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { name: SortDirection @@ -107,9 +100,10 @@ input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -125,13 +119,6 @@ input MovieActorsConnectionWhere { node: ActorWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -157,9 +144,10 @@ input MovieWhere { actors_SINGLE: ActorWhere "Return Movies where some of the related Actors match this filter" actors_SOME: ActorWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -171,12 +159,12 @@ input MovieWhere { .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } -type Movie { +type Movie @node { id: ID actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } @@ -190,8 +178,8 @@ schema { } type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! name: String } @@ -218,8 +206,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -254,10 +242,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -279,13 +267,6 @@ input ActorMoviesConnectionWhere { node: MovieWhere } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { name: SortDirection @@ -311,9 +292,10 @@ input ActorWhere { movies_SINGLE: MovieWhere "Return Actors where some of the related Movies match this filter" movies_SOME: MovieWhere - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -329,13 +311,6 @@ input MovieActorsConnectionWhere { node: ActorWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -361,9 +336,10 @@ input MovieWhere { actors_SINGLE: ActorWhere "Return Movies where some of the related Actors match this filter" actors_SOME: ActorWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } diff --git a/core/src/test/resources/tck-test-files/schema/v2/directives/relationship.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/directives/relationship.js.adoc index fe8fa7db..233e59c8 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/directives/relationship.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/directives/relationship.js.adoc @@ -9,11 +9,11 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String } -type Movie { +type Movie @node { id: ID actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } @@ -35,15 +35,6 @@ type ActorEdge { node: Actor! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -55,9 +46,10 @@ input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -69,8 +61,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -101,15 +93,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -145,9 +128,10 @@ input MovieWhere { actors_SINGLE: ActorWhere """Return Movies where some of the related Actors match this filter""" actors_SOME: ActorWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -167,10 +151,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" @@ -187,12 +171,12 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } -type Movie { +type Movie @node { id: ID actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } @@ -206,8 +190,8 @@ schema { } type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! name: String } @@ -238,15 +222,6 @@ type ActorMoviesRelationship { node: Movie! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -282,9 +257,10 @@ input ActorWhere { movies_SINGLE: MovieWhere """Return Actors where some of the related Movies match this filter""" movies_SOME: MovieWhere - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -296,8 +272,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -328,15 +304,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -372,9 +339,10 @@ input MovieWhere { actors_SINGLE: ActorWhere """Return Movies where some of the related Actors match this filter""" actors_SOME: ActorWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -394,10 +362,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/enum.adoc b/core/src/test/resources/tck-test-files/schema/v2/enum.adoc index d2e2f272..e416fd76 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/enum.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/enum.adoc @@ -14,7 +14,7 @@ enum Status { PENDING } -type Movie { +type Movie @node { status: Status } ---- @@ -50,8 +50,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -68,13 +68,6 @@ enum Status { PENDING } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { status: SortDirection @@ -84,7 +77,8 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - status: Status + status: Status @deprecated(reason : "Please use the explicit _EQ version") + status_EQ: Status status_IN: [Status] } diff --git a/core/src/test/resources/tck-test-files/schema/v2/enum.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/enum.js.adoc index 02969a14..f91c18a5 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/enum.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/enum.js.adoc @@ -15,7 +15,7 @@ enum Status { PENDING } -type Movie { +type Movie @node { status: Status } ---- @@ -36,15 +36,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -56,7 +47,8 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - status: Status + status: Status @deprecated(reason: "Please use the explicit _EQ version") + status_EQ: Status status_IN: [Status] } @@ -75,8 +67,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/comments.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/comments.adoc deleted file mode 100644 index bd8001ee..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/comments.adoc +++ /dev/null @@ -1,814 +0,0 @@ -:toc: -:toclevels: 42 - -= Comments - -== Simple - -.Schema -[source,graphql,schema=true] ----- -"A custom scalar." -scalar CustomScalar - -"An enumeration of movie genres." -enum Genre { - ACTION - DRAMA - ROMANCE -} - -"""A type describing a movie.""" -type Movie { - id: ID - "The number of actors who acted in the movie." - actorCount: Int - """The average rating for the movie.""" - averageRating: Float - """ - Is the movie active? - - This is measured based on annual profit. - """ - isActive: Boolean - genre: Genre - customScalar: CustomScalar -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -"A type describing a movie." -type Movie { - "The number of actors who acted in the movie." - actorCount: Int - "The average rating for the movie." - averageRating: Float - customScalar: CustomScalar - genre: Genre - id: ID - """ - Is the movie active? - - This is measured based on annual profit. - """ - isActive: Boolean -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"An enumeration of movie genres." -enum Genre { - ACTION - DRAMA - ROMANCE -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -"A custom scalar." -scalar CustomScalar - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - actorCount: SortDirection - averageRating: SortDirection - customScalar: SortDirection - genre: SortDirection - id: SortDirection - isActive: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - customScalar: CustomScalar - customScalar_IN: [CustomScalar] - genre: Genre - genre_IN: [Genre] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - isActive: Boolean -} - ----- - -== Relationship - -=== Simple - -.Schema -[source,graphql,schema=true] ----- -type Actor { - name: String -} - -type Movie { - id: ID - "Actors in Movie" - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Actor { - name: String -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - "Actors in Movie" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - -"Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." -input ActorSort { - name: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related Actors match this filter" - actors_ALL: ActorWhere - "Return Movies where none of the related Actors match this filter" - actors_NONE: ActorWhere - "Return Movies where one of the related Actors match this filter" - actors_SINGLE: ActorWhere - "Return Movies where some of the related Actors match this filter" - actors_SOME: ActorWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - ----- - -=== Interface - -.Schema -[source,graphql,schema=true] ----- -interface Production { - title: String! -} - -type Movie implements Production { - title: String! - runtime: Int! -} - -type Series implements Production { - title: String! - episodes: Int! -} - -type ActedIn @relationshipProperties { - screenTime: Int! -} - -type Actor { - name: String! - "Acted in Production" - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -interface Production { - title: String! -} - -""" -The edge properties for the following fields: -* Actor.actedIn -""" -type ActedIn { - screenTime: Int! -} - -type Actor { - "Acted in Production" - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type ActorActedInRelationship { - cursor: String! - node: Production! - properties: ActedIn! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie implements Production { - runtime: Int! - title: String! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type ProductionEdge { - cursor: String! - node: Production! -} - -type ProductionsConnection { - edges: [ProductionEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements Production { - episodes: Int! - title: String! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -enum ProductionImplementation { - Movie - Series -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input ActedInSort { - screenTime: SortDirection -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int -} - -input ActorActedInConnectionSort { - edge: ActedInSort - node: ProductionSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - node: ProductionWhere -} - -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - -"Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." -input ActorSort { - name: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - "Return Actors where all of the related ActorActedInConnections match this filter" - actedInConnection_ALL: ActorActedInConnectionWhere - "Return Actors where none of the related ActorActedInConnections match this filter" - actedInConnection_NONE: ActorActedInConnectionWhere - "Return Actors where one of the related ActorActedInConnections match this filter" - actedInConnection_SINGLE: ActorActedInConnectionWhere - "Return Actors where some of the related ActorActedInConnections match this filter" - actedInConnection_SOME: ActorActedInConnectionWhere - "Return Actors where all of the related Productions match this filter" - actedIn_ALL: ProductionWhere - "Return Actors where none of the related Productions match this filter" - actedIn_NONE: ProductionWhere - "Return Actors where one of the related Productions match this filter" - actedIn_SINGLE: ProductionWhere - "Return Actors where some of the related Productions match this filter" - actedIn_SOME: ProductionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_STARTS_WITH: String -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - runtime: SortDirection - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - -input ProductionOptions { - limit: Int - offset: Int - "Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ProductionSort] -} - -"Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object." -input ProductionSort { - title: SortDirection -} - -input ProductionWhere { - AND: [ProductionWhere!] - NOT: ProductionWhere - OR: [ProductionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] -} - -input SeriesOptions { - limit: Int - offset: Int - "Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array." - sort: [SeriesSort!] -} - -"Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object." -input SeriesSort { - episodes: SortDirection - title: SortDirection -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - episodes: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - ----- - -=== Unions - -.Schema -[source,graphql,schema=true] ----- -union Search = Movie | Genre - -type Genre { - id: ID -} - -type Movie { - id: ID - search: [Search!]! @relationship(type: "SEARCH", direction: OUT) - searchNoDirective: Search -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -union Search = Genre | Movie - -type Genre { - id: ID -} - -type GenreEdge { - cursor: String! - node: Genre! -} - -type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - id: ID - search(directed: Boolean = true, options: QueryOptions, where: SearchWhere): [Search!]! - searchConnection(after: String, directed: Boolean = true, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! - searchNoDirective: Search -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieSearchConnection { - edges: [MovieSearchRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieSearchRelationship { - cursor: String! - node: Search! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - searches(options: QueryOptions, where: SearchWhere): [Search!]! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input GenreOptions { - limit: Int - offset: Int - "Specify one or more GenreSort objects to sort Genres by. The sorts will be applied in the order in which they are arranged in the array." - sort: [GenreSort!] -} - -"Fields to sort Genres by. The order in which sorts are applied is not guaranteed when specifying many fields in one GenreSort object." -input GenreSort { - id: SortDirection -} - -input GenreWhere { - AND: [GenreWhere!] - NOT: GenreWhere - OR: [GenreWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -input MovieSearchConnectionWhere { - Genre: MovieSearchGenreConnectionWhere - Movie: MovieSearchMovieConnectionWhere -} - -input MovieSearchGenreConnectionWhere { - AND: [MovieSearchGenreConnectionWhere!] - NOT: MovieSearchGenreConnectionWhere - OR: [MovieSearchGenreConnectionWhere!] - node: GenreWhere -} - -input MovieSearchMovieConnectionWhere { - AND: [MovieSearchMovieConnectionWhere!] - NOT: MovieSearchMovieConnectionWhere - OR: [MovieSearchMovieConnectionWhere!] - node: MovieWhere -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - "Return Movies where all of the related MovieSearchConnections match this filter" - searchConnection_ALL: MovieSearchConnectionWhere - "Return Movies where none of the related MovieSearchConnections match this filter" - searchConnection_NONE: MovieSearchConnectionWhere - "Return Movies where one of the related MovieSearchConnections match this filter" - searchConnection_SINGLE: MovieSearchConnectionWhere - "Return Movies where some of the related MovieSearchConnections match this filter" - searchConnection_SOME: MovieSearchConnectionWhere - "Return Movies where all of the related Searches match this filter" - search_ALL: SearchWhere - "Return Movies where none of the related Searches match this filter" - search_NONE: SearchWhere - "Return Movies where one of the related Searches match this filter" - search_SINGLE: SearchWhere - "Return Movies where some of the related Searches match this filter" - search_SOME: SearchWhere -} - -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - -input SearchWhere { - Genre: GenreWhere - Movie: MovieWhere -} - ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/comments.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/comments.js.adoc deleted file mode 100644 index 7b088b12..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/comments.js.adoc +++ /dev/null @@ -1,871 +0,0 @@ -// This file was generated by the Test-Case extractor of neo4j-graphql -:toc: -:toclevels: 42 - -= Comments - -== Simple - -.Schema -[source,graphql,schema=true] ----- -"A custom scalar." -scalar CustomScalar - -"An enumeration of movie genres." -enum Genre { - ACTION - DRAMA - ROMANCE -} - -"""A type describing a movie.""" -type Movie { - id: ID - "The number of actors who acted in the movie." - actorCount: Int - """The average rating for the movie.""" - averageRating: Float - """ - Is the movie active? - - This is measured based on annual profit. - """ - isActive: Boolean - genre: Genre - customScalar: CustomScalar -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -"""A custom scalar.""" -scalar CustomScalar - -"""An enumeration of movie genres.""" -enum Genre { - ACTION - DRAMA - ROMANCE -} - -"""A type describing a movie.""" -type Movie { - """The number of actors who acted in the movie.""" - actorCount: Int - """The average rating for the movie.""" - averageRating: Float - customScalar: CustomScalar - genre: Genre - id: ID - """ - Is the movie active? - - This is measured based on annual profit. - """ - isActive: Boolean -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - actorCount: SortDirection - averageRating: SortDirection - customScalar: SortDirection - genre: SortDirection - id: SortDirection - isActive: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - customScalar: CustomScalar - customScalar_IN: [CustomScalar] - genre: Genre - genre_IN: [Genre] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - isActive: Boolean -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -== Relationship - -=== Simple - -.Schema -[source,graphql,schema=true] ----- -type Actor { - name: String -} - -type Movie { - id: ID - "Actors in Movie" - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Actor { - name: String -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - -""" -Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. -""" -input ActorSort { - name: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - """Actors in Movie""" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related Actors match this filter""" - actors_ALL: ActorWhere - """Return Movies where none of the related Actors match this filter""" - actors_NONE: ActorWhere - """Return Movies where one of the related Actors match this filter""" - actors_SINGLE: ActorWhere - """Return Movies where some of the related Actors match this filter""" - actors_SOME: ActorWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== Interface - -.Schema -[source,graphql,schema=true] ----- -interface Production { - title: String! -} - -type Movie implements Production { - title: String! - runtime: Int! -} - -type Series implements Production { - title: String! - episodes: Int! -} - -type ActedIn @relationshipProperties { - screenTime: Int! -} - -type Actor { - name: String! - "Acted in Production" - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -""" -The edge properties for the following fields: -* Actor.actedIn -""" -type ActedIn { - screenTime: Int! -} - -input ActedInSort { - screenTime: SortDirection -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int -} - -type Actor { - """Acted in Production""" - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionSort { - edge: ActedInSort - node: ProductionSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - node: ProductionWhere -} - -type ActorActedInRelationship { - cursor: String! - node: Production! - properties: ActedIn! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - -""" -Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. -""" -input ActorSort { - name: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - """ - Return Actors where all of the related ActorActedInConnections match this filter - """ - actedInConnection_ALL: ActorActedInConnectionWhere - """ - Return Actors where none of the related ActorActedInConnections match this filter - """ - actedInConnection_NONE: ActorActedInConnectionWhere - """ - Return Actors where one of the related ActorActedInConnections match this filter - """ - actedInConnection_SINGLE: ActorActedInConnectionWhere - """ - Return Actors where some of the related ActorActedInConnections match this filter - """ - actedInConnection_SOME: ActorActedInConnectionWhere - """Return Actors where all of the related Productions match this filter""" - actedIn_ALL: ProductionWhere - """Return Actors where none of the related Productions match this filter""" - actedIn_NONE: ProductionWhere - """Return Actors where one of the related Productions match this filter""" - actedIn_SINGLE: ProductionWhere - """Return Actors where some of the related Productions match this filter""" - actedIn_SOME: ProductionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie implements Production { - runtime: Int! - title: String! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - runtime: SortDirection - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Production { - title: String! -} - -type ProductionEdge { - cursor: String! - node: Production! -} - -enum ProductionImplementation { - Movie - Series -} - -input ProductionOptions { - limit: Int - offset: Int - """ - Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ProductionSort] -} - -""" -Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. -""" -input ProductionSort { - title: SortDirection -} - -input ProductionWhere { - AND: [ProductionWhere!] - NOT: ProductionWhere - OR: [ProductionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] -} - -type ProductionsConnection { - edges: [ProductionEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements Production { - episodes: Int! - title: String! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -input SeriesOptions { - limit: Int - offset: Int - """ - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [SeriesSort!] -} - -""" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -""" -input SeriesSort { - episodes: SortDirection - title: SortDirection -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - episodes: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== Unions - -.Schema -[source,graphql,schema=true] ----- -union Search = Movie | Genre - -type Genre { - id: ID -} - -type Movie { - id: ID - search: [Search!]! @relationship(type: "SEARCH", direction: OUT) - searchNoDirective: Search -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Genre { - id: ID -} - -type GenreEdge { - cursor: String! - node: Genre! -} - -input GenreOptions { - limit: Int - offset: Int - """ - Specify one or more GenreSort objects to sort Genres by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [GenreSort!] -} - -""" -Fields to sort Genres by. The order in which sorts are applied is not guaranteed when specifying many fields in one GenreSort object. -""" -input GenreSort { - id: SortDirection -} - -input GenreWhere { - AND: [GenreWhere!] - NOT: GenreWhere - OR: [GenreWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - id: ID - search(directed: Boolean = true, options: QueryOptions, where: SearchWhere): [Search!]! - searchConnection(after: String, directed: Boolean = true, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! - searchNoDirective: Search -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -type MovieSearchConnection { - edges: [MovieSearchRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieSearchConnectionWhere { - Genre: MovieSearchGenreConnectionWhere - Movie: MovieSearchMovieConnectionWhere -} - -input MovieSearchGenreConnectionWhere { - AND: [MovieSearchGenreConnectionWhere!] - NOT: MovieSearchGenreConnectionWhere - OR: [MovieSearchGenreConnectionWhere!] - node: GenreWhere -} - -input MovieSearchMovieConnectionWhere { - AND: [MovieSearchMovieConnectionWhere!] - NOT: MovieSearchMovieConnectionWhere - OR: [MovieSearchMovieConnectionWhere!] - node: MovieWhere -} - -type MovieSearchRelationship { - cursor: String! - node: Search! -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - """ - Return Movies where all of the related MovieSearchConnections match this filter - """ - searchConnection_ALL: MovieSearchConnectionWhere - """ - Return Movies where none of the related MovieSearchConnections match this filter - """ - searchConnection_NONE: MovieSearchConnectionWhere - """ - Return Movies where one of the related MovieSearchConnections match this filter - """ - searchConnection_SINGLE: MovieSearchConnectionWhere - """ - Return Movies where some of the related MovieSearchConnections match this filter - """ - searchConnection_SOME: MovieSearchConnectionWhere - """Return Movies where all of the related Searches match this filter""" - search_ALL: SearchWhere - """Return Movies where none of the related Searches match this filter""" - search_NONE: SearchWhere - """Return Movies where one of the related Searches match this filter""" - search_SINGLE: SearchWhere - """Return Movies where some of the related Searches match this filter""" - search_SOME: SearchWhere -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - searches(options: QueryOptions, where: SearchWhere): [Search!]! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int -} - -union Search = Genre | Movie - -input SearchWhere { - Genre: GenreWhere - Movie: MovieWhere -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directive-preserve.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directive-preserve.adoc deleted file mode 100644 index 15e36644..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directive-preserve.adoc +++ /dev/null @@ -1,1378 +0,0 @@ -:toc: -:toclevels: 42 - -= Directive-preserve - -== Custom directives preserved - -.Schema -[source,graphql,schema=true] ----- -directive @preservedTopLevel(string: String, int: Int, float: Float, boolean: Boolean) on OBJECT - -directive @preservedFieldLevel(string: String, int: Int, float: Float, boolean: Boolean) on FIELD_DEFINITION - -type Movie @preservedTopLevel { - id: ID @preservedFieldLevel(string: "str", int: 12, float: 1.2, boolean: true) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -directive @preservedFieldLevel(boolean: Boolean, float: Float, int: Int, string: String) on FIELD_DEFINITION - -directive @preservedTopLevel(boolean: Boolean, float: Float, int: Int, string: String) on OBJECT - -type Movie @preservedTopLevel { - id: ID @preservedFieldLevel(boolean : true, float : 1.2, int : 12, string : "str") -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - ----- - -== Directives on relations preserved - -.Schema -[source,graphql,schema=true] ----- -type Movie { - title: String - year: Int - imdbRating: Float - genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT) @deprecated(reason: "Do not use") -} - -type Genre { - name: String - movies: [Movie!]! @relationship(type: "IN_GENRE", direction: IN) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Genre { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! - name: String -} - -type GenreEdge { - cursor: String! - node: Genre! -} - -type GenreMoviesConnection { - edges: [GenreMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type GenreMoviesRelationship { - cursor: String! - node: Movie! -} - -type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - genres(directed: Boolean = true, options: GenreOptions, where: GenreWhere): [Genre!]! @deprecated(reason : "Do not use") - genresConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! @deprecated(reason : "Do not use") - imdbRating: Float - title: String - year: Int -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieGenresConnection { - edges: [MovieGenresRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieGenresRelationship { - cursor: String! - node: Genre! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input GenreMoviesConnectionSort { - node: MovieSort -} - -input GenreMoviesConnectionWhere { - AND: [GenreMoviesConnectionWhere!] - NOT: GenreMoviesConnectionWhere - OR: [GenreMoviesConnectionWhere!] - node: MovieWhere -} - -input GenreOptions { - limit: Int - offset: Int - "Specify one or more GenreSort objects to sort Genres by. The sorts will be applied in the order in which they are arranged in the array." - sort: [GenreSort!] -} - -"Fields to sort Genres by. The order in which sorts are applied is not guaranteed when specifying many fields in one GenreSort object." -input GenreSort { - name: SortDirection -} - -input GenreWhere { - AND: [GenreWhere!] - NOT: GenreWhere - OR: [GenreWhere!] - "Return Genres where all of the related GenreMoviesConnections match this filter" - moviesConnection_ALL: GenreMoviesConnectionWhere - "Return Genres where none of the related GenreMoviesConnections match this filter" - moviesConnection_NONE: GenreMoviesConnectionWhere - "Return Genres where one of the related GenreMoviesConnections match this filter" - moviesConnection_SINGLE: GenreMoviesConnectionWhere - "Return Genres where some of the related GenreMoviesConnections match this filter" - moviesConnection_SOME: GenreMoviesConnectionWhere - "Return Genres where all of the related Movies match this filter" - movies_ALL: MovieWhere - "Return Genres where none of the related Movies match this filter" - movies_NONE: MovieWhere - "Return Genres where one of the related Movies match this filter" - movies_SINGLE: MovieWhere - "Return Genres where some of the related Movies match this filter" - movies_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -input MovieGenresConnectionSort { - node: GenreSort -} - -input MovieGenresConnectionWhere { - AND: [MovieGenresConnectionWhere!] - NOT: MovieGenresConnectionWhere - OR: [MovieGenresConnectionWhere!] - node: GenreWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - imdbRating: SortDirection - title: SortDirection - year: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieGenresConnections match this filter" - genresConnection_ALL: MovieGenresConnectionWhere @deprecated(reason : "Do not use") - "Return Movies where none of the related MovieGenresConnections match this filter" - genresConnection_NONE: MovieGenresConnectionWhere @deprecated(reason : "Do not use") - "Return Movies where one of the related MovieGenresConnections match this filter" - genresConnection_SINGLE: MovieGenresConnectionWhere @deprecated(reason : "Do not use") - "Return Movies where some of the related MovieGenresConnections match this filter" - genresConnection_SOME: MovieGenresConnectionWhere @deprecated(reason : "Do not use") - "Return Movies where all of the related Genres match this filter" - genres_ALL: GenreWhere @deprecated(reason : "Do not use") - "Return Movies where none of the related Genres match this filter" - genres_NONE: GenreWhere @deprecated(reason : "Do not use") - "Return Movies where one of the related Genres match this filter" - genres_SINGLE: GenreWhere @deprecated(reason : "Do not use") - "Return Movies where some of the related Genres match this filter" - genres_SOME: GenreWhere @deprecated(reason : "Do not use") - imdbRating: Float - imdbRating_GT: Float - imdbRating_GTE: Float - imdbRating_IN: [Float] - imdbRating_LT: Float - imdbRating_LTE: Float - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String - year: Int - year_GT: Int - year_GTE: Int - year_IN: [Int] - year_LT: Int - year_LTE: Int -} - ----- - -== Directives on implemented interface relations preserved - field not declared relationship - -.Schema -[source,graphql,schema=true] ----- -interface Production { - title: String! - actors: [Actor!]! -} - -type Movie implements Production { - title: String! - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") @deprecated(reason: "Do not use") - runtime: Int! -} - -type Series implements Production { - title: String! - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") - episodes: Int! -} - -type ActedIn @relationshipProperties { - role: String! -} - -type Actor { - name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -interface Production { - actors: [Actor!]! - title: String! -} - -""" -The edge properties for the following fields: -* Movie.actors -* Series.actors -* Actor.actedIn -""" -type ActedIn { - role: String! -} - -type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type ActorActedInRelationship { - cursor: String! - node: Production! - properties: ActedIn! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie implements Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! @deprecated(reason : "Do not use") - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @deprecated(reason : "Do not use") - runtime: Int! - title: String! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! - properties: ActedIn! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type ProductionEdge { - cursor: String! - node: Production! -} - -type ProductionsConnection { - edges: [ProductionEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [SeriesActorsConnectionSort!], where: SeriesActorsConnectionWhere): SeriesActorsConnection! - episodes: Int! - title: String! -} - -type SeriesActorsConnection { - edges: [SeriesActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type SeriesActorsRelationship { - cursor: String! - node: Actor! - properties: ActedIn! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -enum ProductionImplementation { - Movie - Series -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input ActedInSort { - role: SortDirection -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - role: String - role_CONTAINS: String - role_ENDS_WITH: String - role_IN: [String!] - role_STARTS_WITH: String -} - -input ActorActedInConnectionSort { - edge: ActedInSort - node: ProductionSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - node: ProductionWhere -} - -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - -"Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." -input ActorSort { - name: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - "Return Actors where all of the related ActorActedInConnections match this filter" - actedInConnection_ALL: ActorActedInConnectionWhere - "Return Actors where none of the related ActorActedInConnections match this filter" - actedInConnection_NONE: ActorActedInConnectionWhere - "Return Actors where one of the related ActorActedInConnections match this filter" - actedInConnection_SINGLE: ActorActedInConnectionWhere - "Return Actors where some of the related ActorActedInConnections match this filter" - actedInConnection_SOME: ActorActedInConnectionWhere - "Return Actors where all of the related Productions match this filter" - actedIn_ALL: ProductionWhere - "Return Actors where none of the related Productions match this filter" - actedIn_NONE: ProductionWhere - "Return Actors where one of the related Productions match this filter" - actedIn_SINGLE: ProductionWhere - "Return Actors where some of the related Productions match this filter" - actedIn_SOME: ProductionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_STARTS_WITH: String -} - -input MovieActorsConnectionSort { - edge: ActedInSort - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - edge: ActedInWhere - node: ActorWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - runtime: SortDirection - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason : "Do not use") - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason : "Do not use") - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason : "Do not use") - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason : "Do not use") - "Return Movies where all of the related Actors match this filter" - actors_ALL: ActorWhere @deprecated(reason : "Do not use") - "Return Movies where none of the related Actors match this filter" - actors_NONE: ActorWhere @deprecated(reason : "Do not use") - "Return Movies where one of the related Actors match this filter" - actors_SINGLE: ActorWhere @deprecated(reason : "Do not use") - "Return Movies where some of the related Actors match this filter" - actors_SOME: ActorWhere @deprecated(reason : "Do not use") - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - -input ProductionOptions { - limit: Int - offset: Int - "Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ProductionSort] -} - -"Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object." -input ProductionSort { - title: SortDirection -} - -input ProductionWhere { - AND: [ProductionWhere!] - NOT: ProductionWhere - OR: [ProductionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] -} - -input SeriesActorsConnectionSort { - edge: ActedInSort - node: ActorSort -} - -input SeriesActorsConnectionWhere { - AND: [SeriesActorsConnectionWhere!] - NOT: SeriesActorsConnectionWhere - OR: [SeriesActorsConnectionWhere!] - edge: ActedInWhere - node: ActorWhere -} - -input SeriesOptions { - limit: Int - offset: Int - "Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array." - sort: [SeriesSort!] -} - -"Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object." -input SeriesSort { - episodes: SortDirection - title: SortDirection -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - "Return Series where all of the related SeriesActorsConnections match this filter" - actorsConnection_ALL: SeriesActorsConnectionWhere - "Return Series where none of the related SeriesActorsConnections match this filter" - actorsConnection_NONE: SeriesActorsConnectionWhere - "Return Series where one of the related SeriesActorsConnections match this filter" - actorsConnection_SINGLE: SeriesActorsConnectionWhere - "Return Series where some of the related SeriesActorsConnections match this filter" - actorsConnection_SOME: SeriesActorsConnectionWhere - "Return Series where all of the related Actors match this filter" - actors_ALL: ActorWhere - "Return Series where none of the related Actors match this filter" - actors_NONE: ActorWhere - "Return Series where one of the related Actors match this filter" - actors_SINGLE: ActorWhere - "Return Series where some of the related Actors match this filter" - actors_SOME: ActorWhere - episodes: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - ----- - -== Directives on base interface preserved - -.Schema -[source,graphql,schema=true] ----- -interface Production { - title: String! - actors: [Actor!]! @deprecated(reason: "Do not use") -} - -type Movie implements Production { - title: String! - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") - runtime: Int! -} - -type Series implements Production { - title: String! - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") - episodes: Int! -} - -type ActedIn @relationshipProperties { - role: String! -} - -type Actor { - name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -interface Production { - actors: [Actor!]! @deprecated(reason : "Do not use") - title: String! -} - -""" -The edge properties for the following fields: -* Movie.actors -* Series.actors -* Actor.actedIn -""" -type ActedIn { - role: String! -} - -type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type ActorActedInRelationship { - cursor: String! - node: Production! - properties: ActedIn! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie implements Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - runtime: Int! - title: String! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! - properties: ActedIn! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type ProductionEdge { - cursor: String! - node: Production! -} - -type ProductionsConnection { - edges: [ProductionEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [SeriesActorsConnectionSort!], where: SeriesActorsConnectionWhere): SeriesActorsConnection! - episodes: Int! - title: String! -} - -type SeriesActorsConnection { - edges: [SeriesActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type SeriesActorsRelationship { - cursor: String! - node: Actor! - properties: ActedIn! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -enum ProductionImplementation { - Movie - Series -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input ActedInSort { - role: SortDirection -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - role: String - role_CONTAINS: String - role_ENDS_WITH: String - role_IN: [String!] - role_STARTS_WITH: String -} - -input ActorActedInConnectionSort { - edge: ActedInSort - node: ProductionSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - node: ProductionWhere -} - -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - -"Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." -input ActorSort { - name: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - "Return Actors where all of the related ActorActedInConnections match this filter" - actedInConnection_ALL: ActorActedInConnectionWhere - "Return Actors where none of the related ActorActedInConnections match this filter" - actedInConnection_NONE: ActorActedInConnectionWhere - "Return Actors where one of the related ActorActedInConnections match this filter" - actedInConnection_SINGLE: ActorActedInConnectionWhere - "Return Actors where some of the related ActorActedInConnections match this filter" - actedInConnection_SOME: ActorActedInConnectionWhere - "Return Actors where all of the related Productions match this filter" - actedIn_ALL: ProductionWhere - "Return Actors where none of the related Productions match this filter" - actedIn_NONE: ProductionWhere - "Return Actors where one of the related Productions match this filter" - actedIn_SINGLE: ProductionWhere - "Return Actors where some of the related Productions match this filter" - actedIn_SOME: ProductionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_STARTS_WITH: String -} - -input MovieActorsConnectionSort { - edge: ActedInSort - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - edge: ActedInWhere - node: ActorWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - runtime: SortDirection - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related Actors match this filter" - actors_ALL: ActorWhere - "Return Movies where none of the related Actors match this filter" - actors_NONE: ActorWhere - "Return Movies where one of the related Actors match this filter" - actors_SINGLE: ActorWhere - "Return Movies where some of the related Actors match this filter" - actors_SOME: ActorWhere - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - -input ProductionOptions { - limit: Int - offset: Int - "Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ProductionSort] -} - -"Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object." -input ProductionSort { - title: SortDirection -} - -input ProductionWhere { - AND: [ProductionWhere!] - NOT: ProductionWhere - OR: [ProductionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] -} - -input SeriesActorsConnectionSort { - edge: ActedInSort - node: ActorSort -} - -input SeriesActorsConnectionWhere { - AND: [SeriesActorsConnectionWhere!] - NOT: SeriesActorsConnectionWhere - OR: [SeriesActorsConnectionWhere!] - edge: ActedInWhere - node: ActorWhere -} - -input SeriesOptions { - limit: Int - offset: Int - "Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array." - sort: [SeriesSort!] -} - -"Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object." -input SeriesSort { - episodes: SortDirection - title: SortDirection -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - "Return Series where all of the related SeriesActorsConnections match this filter" - actorsConnection_ALL: SeriesActorsConnectionWhere - "Return Series where none of the related SeriesActorsConnections match this filter" - actorsConnection_NONE: SeriesActorsConnectionWhere - "Return Series where one of the related SeriesActorsConnections match this filter" - actorsConnection_SINGLE: SeriesActorsConnectionWhere - "Return Series where some of the related SeriesActorsConnections match this filter" - actorsConnection_SOME: SeriesActorsConnectionWhere - "Return Series where all of the related Actors match this filter" - actors_ALL: ActorWhere - "Return Series where none of the related Actors match this filter" - actors_NONE: ActorWhere - "Return Series where one of the related Actors match this filter" - actors_SINGLE: ActorWhere - "Return Series where some of the related Actors match this filter" - actors_SOME: ActorWhere - episodes: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - ----- - -== Directives on unions preserved - -.Schema -[source,graphql,schema=true] ----- -union Content = Blog | Post - -type Blog { - title: String - posts: [Post!]! @relationship(type: "HAS_POST", direction: OUT) -} - -type Post { - content: String @deprecated(reason: "Do not use post.content") -} - -type User { - name: String - content: [Content!]! @relationship(type: "HAS_CONTENT", direction: OUT) @deprecated(reason: "Do not use user.content") -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -union Content = Blog | Post - -type Blog { - posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! - postsConnection(after: String, directed: Boolean = true, first: Int, sort: [BlogPostsConnectionSort!], where: BlogPostsConnectionWhere): BlogPostsConnection! - title: String -} - -type BlogEdge { - cursor: String! - node: Blog! -} - -type BlogPostsConnection { - edges: [BlogPostsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type BlogPostsRelationship { - cursor: String! - node: Post! -} - -type BlogsConnection { - edges: [BlogEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Post { - content: String @deprecated(reason : "Do not use post.content") -} - -type PostEdge { - cursor: String! - node: Post! -} - -type PostsConnection { - edges: [PostEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - blogs(options: BlogOptions, where: BlogWhere): [Blog!]! - blogsConnection(after: String, first: Int, sort: [BlogSort], where: BlogWhere): BlogsConnection! - contents(options: QueryOptions, where: ContentWhere): [Content!]! - posts(options: PostOptions, where: PostWhere): [Post!]! - postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -type User { - content(directed: Boolean = true, options: QueryOptions, where: ContentWhere): [Content!]! @deprecated(reason : "Do not use user.content") - contentConnection(after: String, directed: Boolean = true, first: Int, where: UserContentConnectionWhere): UserContentConnection! @deprecated(reason : "Do not use user.content") - name: String -} - -type UserContentConnection { - edges: [UserContentRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type UserContentRelationship { - cursor: String! - node: Content! -} - -type UserEdge { - cursor: String! - node: User! -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input BlogOptions { - limit: Int - offset: Int - "Specify one or more BlogSort objects to sort Blogs by. The sorts will be applied in the order in which they are arranged in the array." - sort: [BlogSort!] -} - -input BlogPostsConnectionSort { - node: PostSort -} - -input BlogPostsConnectionWhere { - AND: [BlogPostsConnectionWhere!] - NOT: BlogPostsConnectionWhere - OR: [BlogPostsConnectionWhere!] - node: PostWhere -} - -"Fields to sort Blogs by. The order in which sorts are applied is not guaranteed when specifying many fields in one BlogSort object." -input BlogSort { - title: SortDirection -} - -input BlogWhere { - AND: [BlogWhere!] - NOT: BlogWhere - OR: [BlogWhere!] - "Return Blogs where all of the related BlogPostsConnections match this filter" - postsConnection_ALL: BlogPostsConnectionWhere - "Return Blogs where none of the related BlogPostsConnections match this filter" - postsConnection_NONE: BlogPostsConnectionWhere - "Return Blogs where one of the related BlogPostsConnections match this filter" - postsConnection_SINGLE: BlogPostsConnectionWhere - "Return Blogs where some of the related BlogPostsConnections match this filter" - postsConnection_SOME: BlogPostsConnectionWhere - "Return Blogs where all of the related Posts match this filter" - posts_ALL: PostWhere - "Return Blogs where none of the related Posts match this filter" - posts_NONE: PostWhere - "Return Blogs where one of the related Posts match this filter" - posts_SINGLE: PostWhere - "Return Blogs where some of the related Posts match this filter" - posts_SOME: PostWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - -input ContentWhere { - Blog: BlogWhere - Post: PostWhere -} - -input PostOptions { - limit: Int - offset: Int - "Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PostSort!] -} - -"Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object." -input PostSort { - content: SortDirection @deprecated(reason : "Do not use post.content") -} - -input PostWhere { - AND: [PostWhere!] - NOT: PostWhere - OR: [PostWhere!] - content: String @deprecated(reason : "Do not use post.content") - content_CONTAINS: String @deprecated(reason : "Do not use post.content") - content_ENDS_WITH: String @deprecated(reason : "Do not use post.content") - content_IN: [String] @deprecated(reason : "Do not use post.content") - content_STARTS_WITH: String @deprecated(reason : "Do not use post.content") -} - -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - -input UserContentBlogConnectionWhere { - AND: [UserContentBlogConnectionWhere!] - NOT: UserContentBlogConnectionWhere - OR: [UserContentBlogConnectionWhere!] - node: BlogWhere -} - -input UserContentConnectionWhere { - Blog: UserContentBlogConnectionWhere - Post: UserContentPostConnectionWhere -} - -input UserContentPostConnectionWhere { - AND: [UserContentPostConnectionWhere!] - NOT: UserContentPostConnectionWhere - OR: [UserContentPostConnectionWhere!] - node: PostWhere -} - -input UserOptions { - limit: Int - offset: Int - "Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array." - sort: [UserSort!] -} - -"Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object." -input UserSort { - name: SortDirection -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - "Return Users where all of the related UserContentConnections match this filter" - contentConnection_ALL: UserContentConnectionWhere @deprecated(reason : "Do not use user.content") - "Return Users where none of the related UserContentConnections match this filter" - contentConnection_NONE: UserContentConnectionWhere @deprecated(reason : "Do not use user.content") - "Return Users where one of the related UserContentConnections match this filter" - contentConnection_SINGLE: UserContentConnectionWhere @deprecated(reason : "Do not use user.content") - "Return Users where some of the related UserContentConnections match this filter" - contentConnection_SOME: UserContentConnectionWhere @deprecated(reason : "Do not use user.content") - "Return Users where all of the related Contents match this filter" - content_ALL: ContentWhere @deprecated(reason : "Do not use user.content") - "Return Users where none of the related Contents match this filter" - content_NONE: ContentWhere @deprecated(reason : "Do not use user.content") - "Return Users where one of the related Contents match this filter" - content_SINGLE: ContentWhere @deprecated(reason : "Do not use user.content") - "Return Users where some of the related Contents match this filter" - content_SOME: ContentWhere @deprecated(reason : "Do not use user.content") - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directive-preserve.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directive-preserve.js.adoc deleted file mode 100644 index ac195bb3..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directive-preserve.js.adoc +++ /dev/null @@ -1,1510 +0,0 @@ -// This file was generated by the Test-Case extractor of neo4j-graphql -:toc: -:toclevels: 42 - -= Directive-preserve - -== Custom directives preserved - -.Schema -[source,graphql,schema=true] ----- -directive @preservedTopLevel(string: String, int: Int, float: Float, boolean: Boolean) on OBJECT - -directive @preservedFieldLevel(string: String, int: Int, float: Float, boolean: Boolean) on FIELD_DEFINITION - -type Movie @preservedTopLevel { - id: ID @preservedFieldLevel(string: "str", int: 12, float: 1.2, boolean: true) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -directive @preservedFieldLevel(boolean: Boolean, float: Float, int: Int, string: String) on FIELD_DEFINITION - -directive @preservedTopLevel(boolean: Boolean, float: Float, int: Int, string: String) on OBJECT - -type Movie @preservedTopLevel { - id: ID @preservedFieldLevel(string: "str", int: 12, float: 1.2, boolean: true) -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -== Directives on relations preserved - -.Schema -[source,graphql,schema=true] ----- -type Movie { - title: String - year: Int - imdbRating: Float - genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT) @deprecated(reason: "Do not use") -} - -type Genre { - name: String - movies: [Movie!]! @relationship(type: "IN_GENRE", direction: IN) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Genre { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! - name: String -} - -type GenreEdge { - cursor: String! - node: Genre! -} - -type GenreMoviesConnection { - edges: [GenreMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input GenreMoviesConnectionSort { - node: MovieSort -} - -input GenreMoviesConnectionWhere { - AND: [GenreMoviesConnectionWhere!] - NOT: GenreMoviesConnectionWhere - OR: [GenreMoviesConnectionWhere!] - node: MovieWhere -} - -type GenreMoviesRelationship { - cursor: String! - node: Movie! -} - -input GenreOptions { - limit: Int - offset: Int - """ - Specify one or more GenreSort objects to sort Genres by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [GenreSort!] -} - -""" -Fields to sort Genres by. The order in which sorts are applied is not guaranteed when specifying many fields in one GenreSort object. -""" -input GenreSort { - name: SortDirection -} - -input GenreWhere { - AND: [GenreWhere!] - NOT: GenreWhere - OR: [GenreWhere!] - """ - Return Genres where all of the related GenreMoviesConnections match this filter - """ - moviesConnection_ALL: GenreMoviesConnectionWhere - """ - Return Genres where none of the related GenreMoviesConnections match this filter - """ - moviesConnection_NONE: GenreMoviesConnectionWhere - """ - Return Genres where one of the related GenreMoviesConnections match this filter - """ - moviesConnection_SINGLE: GenreMoviesConnectionWhere - """ - Return Genres where some of the related GenreMoviesConnections match this filter - """ - moviesConnection_SOME: GenreMoviesConnectionWhere - """Return Genres where all of the related Movies match this filter""" - movies_ALL: MovieWhere - """Return Genres where none of the related Movies match this filter""" - movies_NONE: MovieWhere - """Return Genres where one of the related Movies match this filter""" - movies_SINGLE: MovieWhere - """Return Genres where some of the related Movies match this filter""" - movies_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - genres(directed: Boolean = true, options: GenreOptions, where: GenreWhere): [Genre!]! @deprecated(reason: "Do not use") - genresConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! @deprecated(reason: "Do not use") - imdbRating: Float - title: String - year: Int -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieGenresConnection { - edges: [MovieGenresRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieGenresConnectionSort { - node: GenreSort -} - -input MovieGenresConnectionWhere { - AND: [MovieGenresConnectionWhere!] - NOT: MovieGenresConnectionWhere - OR: [MovieGenresConnectionWhere!] - node: GenreWhere -} - -type MovieGenresRelationship { - cursor: String! - node: Genre! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - imdbRating: SortDirection - title: SortDirection - year: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieGenresConnections match this filter - """ - genresConnection_ALL: MovieGenresConnectionWhere @deprecated(reason: "Do not use") - """ - Return Movies where none of the related MovieGenresConnections match this filter - """ - genresConnection_NONE: MovieGenresConnectionWhere @deprecated(reason: "Do not use") - """ - Return Movies where one of the related MovieGenresConnections match this filter - """ - genresConnection_SINGLE: MovieGenresConnectionWhere @deprecated(reason: "Do not use") - """ - Return Movies where some of the related MovieGenresConnections match this filter - """ - genresConnection_SOME: MovieGenresConnectionWhere @deprecated(reason: "Do not use") - """Return Movies where all of the related Genres match this filter""" - genres_ALL: GenreWhere @deprecated(reason: "Do not use") - """Return Movies where none of the related Genres match this filter""" - genres_NONE: GenreWhere @deprecated(reason: "Do not use") - """Return Movies where one of the related Genres match this filter""" - genres_SINGLE: GenreWhere @deprecated(reason: "Do not use") - """Return Movies where some of the related Genres match this filter""" - genres_SOME: GenreWhere @deprecated(reason: "Do not use") - imdbRating: Float - imdbRating_GT: Float - imdbRating_GTE: Float - imdbRating_IN: [Float] - imdbRating_LT: Float - imdbRating_LTE: Float - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String - year: Int - year_GT: Int - year_GTE: Int - year_IN: [Int] - year_LT: Int - year_LTE: Int -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -== Directives on implemented interface relations preserved - field not declared relationship - -.Schema -[source,graphql,schema=true] ----- -interface Production { - title: String! - actors: [Actor!]! -} - -type Movie implements Production { - title: String! - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") @deprecated(reason: "Do not use") - runtime: Int! -} - -type Series implements Production { - title: String! - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") - episodes: Int! -} - -type ActedIn @relationshipProperties { - role: String! -} - -type Actor { - name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -""" -The edge properties for the following fields: -* Movie.actors -* Series.actors -* Actor.actedIn -""" -type ActedIn { - role: String! -} - -input ActedInSort { - role: SortDirection -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - role: String - role_CONTAINS: String - role_ENDS_WITH: String - role_IN: [String!] - role_STARTS_WITH: String -} - -type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionSort { - edge: ActedInSort - node: ProductionSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - node: ProductionWhere -} - -type ActorActedInRelationship { - cursor: String! - node: Production! - properties: ActedIn! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - -""" -Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. -""" -input ActorSort { - name: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - """ - Return Actors where all of the related ActorActedInConnections match this filter - """ - actedInConnection_ALL: ActorActedInConnectionWhere - """ - Return Actors where none of the related ActorActedInConnections match this filter - """ - actedInConnection_NONE: ActorActedInConnectionWhere - """ - Return Actors where one of the related ActorActedInConnections match this filter - """ - actedInConnection_SINGLE: ActorActedInConnectionWhere - """ - Return Actors where some of the related ActorActedInConnections match this filter - """ - actedInConnection_SOME: ActorActedInConnectionWhere - """Return Actors where all of the related Productions match this filter""" - actedIn_ALL: ProductionWhere - """Return Actors where none of the related Productions match this filter""" - actedIn_NONE: ProductionWhere - """Return Actors where one of the related Productions match this filter""" - actedIn_SINGLE: ProductionWhere - """Return Actors where some of the related Productions match this filter""" - actedIn_SOME: ProductionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie implements Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! @deprecated(reason: "Do not use") - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @deprecated(reason: "Do not use") - runtime: Int! - title: String! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - edge: ActedInSort - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - edge: ActedInWhere - node: ActorWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! - properties: ActedIn! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - runtime: SortDirection - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: "Do not use") - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: "Do not use") - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: "Do not use") - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: "Do not use") - """Return Movies where all of the related Actors match this filter""" - actors_ALL: ActorWhere @deprecated(reason: "Do not use") - """Return Movies where none of the related Actors match this filter""" - actors_NONE: ActorWhere @deprecated(reason: "Do not use") - """Return Movies where one of the related Actors match this filter""" - actors_SINGLE: ActorWhere @deprecated(reason: "Do not use") - """Return Movies where some of the related Actors match this filter""" - actors_SOME: ActorWhere @deprecated(reason: "Do not use") - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Production { - actors: [Actor!]! - title: String! -} - -type ProductionEdge { - cursor: String! - node: Production! -} - -enum ProductionImplementation { - Movie - Series -} - -input ProductionOptions { - limit: Int - offset: Int - """ - Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ProductionSort] -} - -""" -Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. -""" -input ProductionSort { - title: SortDirection -} - -input ProductionWhere { - AND: [ProductionWhere!] - NOT: ProductionWhere - OR: [ProductionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] -} - -type ProductionsConnection { - edges: [ProductionEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [SeriesActorsConnectionSort!], where: SeriesActorsConnectionWhere): SeriesActorsConnection! - episodes: Int! - title: String! -} - -type SeriesActorsConnection { - edges: [SeriesActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input SeriesActorsConnectionSort { - edge: ActedInSort - node: ActorSort -} - -input SeriesActorsConnectionWhere { - AND: [SeriesActorsConnectionWhere!] - NOT: SeriesActorsConnectionWhere - OR: [SeriesActorsConnectionWhere!] - edge: ActedInWhere - node: ActorWhere -} - -type SeriesActorsRelationship { - cursor: String! - node: Actor! - properties: ActedIn! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -input SeriesOptions { - limit: Int - offset: Int - """ - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [SeriesSort!] -} - -""" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -""" -input SeriesSort { - episodes: SortDirection - title: SortDirection -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - """ - Return Series where all of the related SeriesActorsConnections match this filter - """ - actorsConnection_ALL: SeriesActorsConnectionWhere - """ - Return Series where none of the related SeriesActorsConnections match this filter - """ - actorsConnection_NONE: SeriesActorsConnectionWhere - """ - Return Series where one of the related SeriesActorsConnections match this filter - """ - actorsConnection_SINGLE: SeriesActorsConnectionWhere - """ - Return Series where some of the related SeriesActorsConnections match this filter - """ - actorsConnection_SOME: SeriesActorsConnectionWhere - """Return Series where all of the related Actors match this filter""" - actors_ALL: ActorWhere - """Return Series where none of the related Actors match this filter""" - actors_NONE: ActorWhere - """Return Series where one of the related Actors match this filter""" - actors_SINGLE: ActorWhere - """Return Series where some of the related Actors match this filter""" - actors_SOME: ActorWhere - episodes: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -== Directives on base interface preserved - -.Schema -[source,graphql,schema=true] ----- -interface Production { - title: String! - actors: [Actor!]! @deprecated(reason: "Do not use") -} - -type Movie implements Production { - title: String! - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") - runtime: Int! -} - -type Series implements Production { - title: String! - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") - episodes: Int! -} - -type ActedIn @relationshipProperties { - role: String! -} - -type Actor { - name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -""" -The edge properties for the following fields: -* Movie.actors -* Series.actors -* Actor.actedIn -""" -type ActedIn { - role: String! -} - -input ActedInSort { - role: SortDirection -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - role: String - role_CONTAINS: String - role_ENDS_WITH: String - role_IN: [String!] - role_STARTS_WITH: String -} - -type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionSort { - edge: ActedInSort - node: ProductionSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - node: ProductionWhere -} - -type ActorActedInRelationship { - cursor: String! - node: Production! - properties: ActedIn! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - -""" -Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. -""" -input ActorSort { - name: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - """ - Return Actors where all of the related ActorActedInConnections match this filter - """ - actedInConnection_ALL: ActorActedInConnectionWhere - """ - Return Actors where none of the related ActorActedInConnections match this filter - """ - actedInConnection_NONE: ActorActedInConnectionWhere - """ - Return Actors where one of the related ActorActedInConnections match this filter - """ - actedInConnection_SINGLE: ActorActedInConnectionWhere - """ - Return Actors where some of the related ActorActedInConnections match this filter - """ - actedInConnection_SOME: ActorActedInConnectionWhere - """Return Actors where all of the related Productions match this filter""" - actedIn_ALL: ProductionWhere - """Return Actors where none of the related Productions match this filter""" - actedIn_NONE: ProductionWhere - """Return Actors where one of the related Productions match this filter""" - actedIn_SINGLE: ProductionWhere - """Return Actors where some of the related Productions match this filter""" - actedIn_SOME: ProductionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie implements Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - runtime: Int! - title: String! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - edge: ActedInSort - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - edge: ActedInWhere - node: ActorWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! - properties: ActedIn! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - runtime: SortDirection - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related Actors match this filter""" - actors_ALL: ActorWhere - """Return Movies where none of the related Actors match this filter""" - actors_NONE: ActorWhere - """Return Movies where one of the related Actors match this filter""" - actors_SINGLE: ActorWhere - """Return Movies where some of the related Actors match this filter""" - actors_SOME: ActorWhere - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Production { - actors: [Actor!]! @deprecated(reason: "Do not use") - title: String! -} - -type ProductionEdge { - cursor: String! - node: Production! -} - -enum ProductionImplementation { - Movie - Series -} - -input ProductionOptions { - limit: Int - offset: Int - """ - Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ProductionSort] -} - -""" -Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. -""" -input ProductionSort { - title: SortDirection -} - -input ProductionWhere { - AND: [ProductionWhere!] - NOT: ProductionWhere - OR: [ProductionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] -} - -type ProductionsConnection { - edges: [ProductionEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [SeriesActorsConnectionSort!], where: SeriesActorsConnectionWhere): SeriesActorsConnection! - episodes: Int! - title: String! -} - -type SeriesActorsConnection { - edges: [SeriesActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input SeriesActorsConnectionSort { - edge: ActedInSort - node: ActorSort -} - -input SeriesActorsConnectionWhere { - AND: [SeriesActorsConnectionWhere!] - NOT: SeriesActorsConnectionWhere - OR: [SeriesActorsConnectionWhere!] - edge: ActedInWhere - node: ActorWhere -} - -type SeriesActorsRelationship { - cursor: String! - node: Actor! - properties: ActedIn! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -input SeriesOptions { - limit: Int - offset: Int - """ - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [SeriesSort!] -} - -""" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -""" -input SeriesSort { - episodes: SortDirection - title: SortDirection -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - """ - Return Series where all of the related SeriesActorsConnections match this filter - """ - actorsConnection_ALL: SeriesActorsConnectionWhere - """ - Return Series where none of the related SeriesActorsConnections match this filter - """ - actorsConnection_NONE: SeriesActorsConnectionWhere - """ - Return Series where one of the related SeriesActorsConnections match this filter - """ - actorsConnection_SINGLE: SeriesActorsConnectionWhere - """ - Return Series where some of the related SeriesActorsConnections match this filter - """ - actorsConnection_SOME: SeriesActorsConnectionWhere - """Return Series where all of the related Actors match this filter""" - actors_ALL: ActorWhere - """Return Series where none of the related Actors match this filter""" - actors_NONE: ActorWhere - """Return Series where one of the related Actors match this filter""" - actors_SINGLE: ActorWhere - """Return Series where some of the related Actors match this filter""" - actors_SOME: ActorWhere - episodes: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -== Directives on unions preserved - -.Schema -[source,graphql,schema=true] ----- -union Content = Blog | Post - -type Blog { - title: String - posts: [Post!]! @relationship(type: "HAS_POST", direction: OUT) -} - -type Post { - content: String @deprecated(reason: "Do not use post.content") -} - -type User { - name: String - content: [Content!]! @relationship(type: "HAS_CONTENT", direction: OUT) @deprecated(reason: "Do not use user.content") -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Blog { - posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! - postsConnection(after: String, directed: Boolean = true, first: Int, sort: [BlogPostsConnectionSort!], where: BlogPostsConnectionWhere): BlogPostsConnection! - title: String -} - -type BlogEdge { - cursor: String! - node: Blog! -} - -input BlogOptions { - limit: Int - offset: Int - """ - Specify one or more BlogSort objects to sort Blogs by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [BlogSort!] -} - -type BlogPostsConnection { - edges: [BlogPostsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input BlogPostsConnectionSort { - node: PostSort -} - -input BlogPostsConnectionWhere { - AND: [BlogPostsConnectionWhere!] - NOT: BlogPostsConnectionWhere - OR: [BlogPostsConnectionWhere!] - node: PostWhere -} - -type BlogPostsRelationship { - cursor: String! - node: Post! -} - -""" -Fields to sort Blogs by. The order in which sorts are applied is not guaranteed when specifying many fields in one BlogSort object. -""" -input BlogSort { - title: SortDirection -} - -input BlogWhere { - AND: [BlogWhere!] - NOT: BlogWhere - OR: [BlogWhere!] - """ - Return Blogs where all of the related BlogPostsConnections match this filter - """ - postsConnection_ALL: BlogPostsConnectionWhere - """ - Return Blogs where none of the related BlogPostsConnections match this filter - """ - postsConnection_NONE: BlogPostsConnectionWhere - """ - Return Blogs where one of the related BlogPostsConnections match this filter - """ - postsConnection_SINGLE: BlogPostsConnectionWhere - """ - Return Blogs where some of the related BlogPostsConnections match this filter - """ - postsConnection_SOME: BlogPostsConnectionWhere - """Return Blogs where all of the related Posts match this filter""" - posts_ALL: PostWhere - """Return Blogs where none of the related Posts match this filter""" - posts_NONE: PostWhere - """Return Blogs where one of the related Posts match this filter""" - posts_SINGLE: PostWhere - """Return Blogs where some of the related Posts match this filter""" - posts_SOME: PostWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - -type BlogsConnection { - edges: [BlogEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -union Content = Blog | Post - -input ContentWhere { - Blog: BlogWhere - Post: PostWhere -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Post { - content: String @deprecated(reason: "Do not use post.content") -} - -type PostEdge { - cursor: String! - node: Post! -} - -input PostOptions { - limit: Int - offset: Int - """ - Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PostSort!] -} - -""" -Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. -""" -input PostSort { - content: SortDirection @deprecated(reason: "Do not use post.content") -} - -input PostWhere { - AND: [PostWhere!] - NOT: PostWhere - OR: [PostWhere!] - content: String @deprecated(reason: "Do not use post.content") - content_CONTAINS: String @deprecated(reason: "Do not use post.content") - content_ENDS_WITH: String @deprecated(reason: "Do not use post.content") - content_IN: [String] @deprecated(reason: "Do not use post.content") - content_STARTS_WITH: String @deprecated(reason: "Do not use post.content") -} - -type PostsConnection { - edges: [PostEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - blogs(options: BlogOptions, where: BlogWhere): [Blog!]! - blogsConnection(after: String, first: Int, sort: [BlogSort], where: BlogWhere): BlogsConnection! - contents(options: QueryOptions, where: ContentWhere): [Content!]! - posts(options: PostOptions, where: PostWhere): [Post!]! - postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} - -type User { - content(directed: Boolean = true, options: QueryOptions, where: ContentWhere): [Content!]! @deprecated(reason: "Do not use user.content") - contentConnection(after: String, directed: Boolean = true, first: Int, where: UserContentConnectionWhere): UserContentConnection! @deprecated(reason: "Do not use user.content") - name: String -} - -input UserContentBlogConnectionWhere { - AND: [UserContentBlogConnectionWhere!] - NOT: UserContentBlogConnectionWhere - OR: [UserContentBlogConnectionWhere!] - node: BlogWhere -} - -type UserContentConnection { - edges: [UserContentRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input UserContentConnectionWhere { - Blog: UserContentBlogConnectionWhere - Post: UserContentPostConnectionWhere -} - -input UserContentPostConnectionWhere { - AND: [UserContentPostConnectionWhere!] - NOT: UserContentPostConnectionWhere - OR: [UserContentPostConnectionWhere!] - node: PostWhere -} - -type UserContentRelationship { - cursor: String! - node: Content! -} - -type UserEdge { - cursor: String! - node: User! -} - -input UserOptions { - limit: Int - offset: Int - """ - Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [UserSort!] -} - -""" -Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. -""" -input UserSort { - name: SortDirection -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - """ - Return Users where all of the related UserContentConnections match this filter - """ - contentConnection_ALL: UserContentConnectionWhere @deprecated(reason: "Do not use user.content") - """ - Return Users where none of the related UserContentConnections match this filter - """ - contentConnection_NONE: UserContentConnectionWhere @deprecated(reason: "Do not use user.content") - """ - Return Users where one of the related UserContentConnections match this filter - """ - contentConnection_SINGLE: UserContentConnectionWhere @deprecated(reason: "Do not use user.content") - """ - Return Users where some of the related UserContentConnections match this filter - """ - contentConnection_SOME: UserContentConnectionWhere @deprecated(reason: "Do not use user.content") - """Return Users where all of the related Contents match this filter""" - content_ALL: ContentWhere @deprecated(reason: "Do not use user.content") - """Return Users where none of the related Contents match this filter""" - content_NONE: ContentWhere @deprecated(reason: "Do not use user.content") - """Return Users where one of the related Contents match this filter""" - content_SINGLE: ContentWhere @deprecated(reason: "Do not use user.content") - """Return Users where some of the related Contents match this filter""" - content_SOME: ContentWhere @deprecated(reason: "Do not use user.content") - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/customResolver.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/customResolver.adoc deleted file mode 100644 index 21dcbd55..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/customResolver.adoc +++ /dev/null @@ -1,151 +0,0 @@ -:toc: -:toclevels: 42 - -= @customResolver directive - -== passes fields directly through with no generation - -.Schema -[source,graphql,schema=true] ----- -interface UserInterface { - customResolver: String -} - -type User implements UserInterface { - id: ID! - username: String! - password: String! - nickname: String! @customResolver - customResolver: String @customResolver -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -interface UserInterface { - customResolver: String -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - userInterfaces(options: UserInterfaceOptions, where: UserInterfaceWhere): [UserInterface!]! - userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort], where: UserInterfaceWhere): UserInterfacesConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -type User implements UserInterface { - customResolver: String - id: ID! - nickname: String! - password: String! - username: String! -} - -type UserEdge { - cursor: String! - node: User! -} - -type UserInterfaceEdge { - cursor: String! - node: UserInterface! -} - -type UserInterfacesConnection { - edges: [UserInterfaceEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -enum UserInterfaceImplementation { - User -} - -input UserInterfaceOptions { - limit: Int - offset: Int - "Specify one or more UserInterfaceSort objects to sort UserInterfaces by. The sorts will be applied in the order in which they are arranged in the array." - sort: [UserInterfaceSort] -} - -"Fields to sort UserInterfaces by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserInterfaceSort object." -input UserInterfaceSort { - customResolver: SortDirection -} - -input UserInterfaceWhere { - AND: [UserInterfaceWhere!] - NOT: UserInterfaceWhere - OR: [UserInterfaceWhere!] - customResolver: String - customResolver_CONTAINS: String - customResolver_ENDS_WITH: String - customResolver_IN: [String] - customResolver_STARTS_WITH: String - typename_IN: [UserInterfaceImplementation!] -} - -input UserOptions { - limit: Int - offset: Int - "Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array." - sort: [UserSort!] -} - -"Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object." -input UserSort { - id: SortDirection - password: SortDirection - username: SortDirection -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_STARTS_WITH: ID - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/customResolver.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/customResolver.js.adoc deleted file mode 100644 index c409a002..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/customResolver.js.adoc +++ /dev/null @@ -1,159 +0,0 @@ -// This file was generated by the Test-Case extractor of neo4j-graphql -:toc: -:toclevels: 42 - -= @customResolver directive - -== passes fields directly through with no generation - -.Schema -[source,graphql,schema=true] ----- -interface UserInterface { - customResolver: String -} - -type User implements UserInterface { - id: ID! - username: String! - password: String! - nickname: String! @customResolver - customResolver: String @customResolver -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - userInterfaces(options: UserInterfaceOptions, where: UserInterfaceWhere): [UserInterface!]! - userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort], where: UserInterfaceWhere): UserInterfacesConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} - -type User implements UserInterface { - customResolver: String - id: ID! - nickname: String! - password: String! - username: String! -} - -type UserEdge { - cursor: String! - node: User! -} - -interface UserInterface { - customResolver: String -} - -type UserInterfaceEdge { - cursor: String! - node: UserInterface! -} - -enum UserInterfaceImplementation { - User -} - -input UserInterfaceOptions { - limit: Int - offset: Int - """ - Specify one or more UserInterfaceSort objects to sort UserInterfaces by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [UserInterfaceSort] -} - -""" -Fields to sort UserInterfaces by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserInterfaceSort object. -""" -input UserInterfaceSort { - customResolver: SortDirection -} - -input UserInterfaceWhere { - AND: [UserInterfaceWhere!] - NOT: UserInterfaceWhere - OR: [UserInterfaceWhere!] - customResolver: String - customResolver_CONTAINS: String - customResolver_ENDS_WITH: String - customResolver_IN: [String] - customResolver_STARTS_WITH: String - typename_IN: [UserInterfaceImplementation!] -} - -type UserInterfacesConnection { - edges: [UserInterfaceEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input UserOptions { - limit: Int - offset: Int - """ - Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [UserSort!] -} - -""" -Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. -""" -input UserSort { - id: SortDirection - password: SortDirection - username: SortDirection -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_STARTS_WITH: ID - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/default.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/default.adoc deleted file mode 100644 index c7ea58d1..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/default.adoc +++ /dev/null @@ -1,214 +0,0 @@ -:toc: -:toclevels: 42 - -= @default directive - -== sets default values in schema - -.Schema -[source,graphql,schema=true] ----- -interface UserInterface { - fromInterface: String! - toBeOverridden: String! -} - -type User implements UserInterface { - id: ID! @default(value: "00000000-00000000-00000000-00000000") - name: String! @default(value: "Jane Smith") - verified: Boolean! @default(value: false) - numberOfFriends: Int! @default(value: 0) - rating: Float! @default(value: 0.0) - verifiedDate: DateTime! @default(value: "1970-01-01T00:00:00.000Z") - fromInterface: String! @default(value: "Interface default value") - toBeOverridden: String! @default(value: "Overridden value") - location: Location! @default(value: HERE) -} - -enum Location { - HERE - THERE - EVERYWHERE -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -interface UserInterface { - fromInterface: String! - toBeOverridden: String! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - userInterfaces(options: UserInterfaceOptions, where: UserInterfaceWhere): [UserInterface!]! - userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort], where: UserInterfaceWhere): UserInterfacesConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -type User implements UserInterface { - fromInterface: String! - id: ID! - location: Location! - name: String! - numberOfFriends: Int! - rating: Float! - toBeOverridden: String! - verified: Boolean! - verifiedDate: DateTime! -} - -type UserEdge { - cursor: String! - node: User! -} - -type UserInterfaceEdge { - cursor: String! - node: UserInterface! -} - -type UserInterfacesConnection { - edges: [UserInterfaceEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -enum Location { - EVERYWHERE - HERE - THERE -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -enum UserInterfaceImplementation { - User -} - -"A date and time, represented as an ISO-8601 string" -scalar DateTime - -input UserInterfaceOptions { - limit: Int - offset: Int - "Specify one or more UserInterfaceSort objects to sort UserInterfaces by. The sorts will be applied in the order in which they are arranged in the array." - sort: [UserInterfaceSort] -} - -"Fields to sort UserInterfaces by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserInterfaceSort object." -input UserInterfaceSort { - fromInterface: SortDirection - toBeOverridden: SortDirection -} - -input UserInterfaceWhere { - AND: [UserInterfaceWhere!] - NOT: UserInterfaceWhere - OR: [UserInterfaceWhere!] - fromInterface: String - fromInterface_CONTAINS: String - fromInterface_ENDS_WITH: String - fromInterface_IN: [String!] - fromInterface_STARTS_WITH: String - toBeOverridden: String - toBeOverridden_CONTAINS: String - toBeOverridden_ENDS_WITH: String - toBeOverridden_IN: [String!] - toBeOverridden_STARTS_WITH: String - typename_IN: [UserInterfaceImplementation!] -} - -input UserOptions { - limit: Int - offset: Int - "Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array." - sort: [UserSort!] -} - -"Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object." -input UserSort { - fromInterface: SortDirection - id: SortDirection - location: SortDirection - name: SortDirection - numberOfFriends: SortDirection - rating: SortDirection - toBeOverridden: SortDirection - verified: SortDirection - verifiedDate: SortDirection -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - fromInterface: String - fromInterface_CONTAINS: String - fromInterface_ENDS_WITH: String - fromInterface_IN: [String!] - fromInterface_STARTS_WITH: String - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_STARTS_WITH: ID - location: Location - location_IN: [Location!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_STARTS_WITH: String - numberOfFriends: Int - numberOfFriends_GT: Int - numberOfFriends_GTE: Int - numberOfFriends_IN: [Int!] - numberOfFriends_LT: Int - numberOfFriends_LTE: Int - rating: Float - rating_GT: Float - rating_GTE: Float - rating_IN: [Float!] - rating_LT: Float - rating_LTE: Float - toBeOverridden: String - toBeOverridden_CONTAINS: String - toBeOverridden_ENDS_WITH: String - toBeOverridden_IN: [String!] - toBeOverridden_STARTS_WITH: String - verified: Boolean - verifiedDate: DateTime - verifiedDate_GT: DateTime - verifiedDate_GTE: DateTime - verifiedDate_IN: [DateTime!] - verifiedDate_LT: DateTime - verifiedDate_LTE: DateTime -} - ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/default.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/default.js.adoc deleted file mode 100644 index 2df2b059..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/default.js.adoc +++ /dev/null @@ -1,222 +0,0 @@ -// This file was generated by the Test-Case extractor of neo4j-graphql -:toc: -:toclevels: 42 - -= @default directive - -== sets default values in schema - -.Schema -[source,graphql,schema=true] ----- -interface UserInterface { - fromInterface: String! - toBeOverridden: String! -} - -type User implements UserInterface { - id: ID! @default(value: "00000000-00000000-00000000-00000000") - name: String! @default(value: "Jane Smith") - verified: Boolean! @default(value: false) - numberOfFriends: Int! @default(value: 0) - rating: Float! @default(value: 0.0) - verifiedDate: DateTime! @default(value: "1970-01-01T00:00:00.000Z") - fromInterface: String! @default(value: "Interface default value") - toBeOverridden: String! @default(value: "Overridden value") - location: Location! @default(value: HERE) -} - -enum Location { - HERE - THERE - EVERYWHERE -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -"""A date and time, represented as an ISO-8601 string""" -scalar DateTime - -enum Location { - EVERYWHERE - HERE - THERE -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - userInterfaces(options: UserInterfaceOptions, where: UserInterfaceWhere): [UserInterface!]! - userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort], where: UserInterfaceWhere): UserInterfacesConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} - -type User implements UserInterface { - fromInterface: String! - id: ID! - location: Location! - name: String! - numberOfFriends: Int! - rating: Float! - toBeOverridden: String! - verified: Boolean! - verifiedDate: DateTime! -} - -type UserEdge { - cursor: String! - node: User! -} - -interface UserInterface { - fromInterface: String! - toBeOverridden: String! -} - -type UserInterfaceEdge { - cursor: String! - node: UserInterface! -} - -enum UserInterfaceImplementation { - User -} - -input UserInterfaceOptions { - limit: Int - offset: Int - """ - Specify one or more UserInterfaceSort objects to sort UserInterfaces by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [UserInterfaceSort] -} - -""" -Fields to sort UserInterfaces by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserInterfaceSort object. -""" -input UserInterfaceSort { - fromInterface: SortDirection - toBeOverridden: SortDirection -} - -input UserInterfaceWhere { - AND: [UserInterfaceWhere!] - NOT: UserInterfaceWhere - OR: [UserInterfaceWhere!] - fromInterface: String - fromInterface_CONTAINS: String - fromInterface_ENDS_WITH: String - fromInterface_IN: [String!] - fromInterface_STARTS_WITH: String - toBeOverridden: String - toBeOverridden_CONTAINS: String - toBeOverridden_ENDS_WITH: String - toBeOverridden_IN: [String!] - toBeOverridden_STARTS_WITH: String - typename_IN: [UserInterfaceImplementation!] -} - -type UserInterfacesConnection { - edges: [UserInterfaceEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input UserOptions { - limit: Int - offset: Int - """ - Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [UserSort!] -} - -""" -Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. -""" -input UserSort { - fromInterface: SortDirection - id: SortDirection - location: SortDirection - name: SortDirection - numberOfFriends: SortDirection - rating: SortDirection - toBeOverridden: SortDirection - verified: SortDirection - verifiedDate: SortDirection -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - fromInterface: String - fromInterface_CONTAINS: String - fromInterface_ENDS_WITH: String - fromInterface_IN: [String!] - fromInterface_STARTS_WITH: String - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_STARTS_WITH: ID - location: Location - location_IN: [Location!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_STARTS_WITH: String - numberOfFriends: Int - numberOfFriends_GT: Int - numberOfFriends_GTE: Int - numberOfFriends_IN: [Int!] - numberOfFriends_LT: Int - numberOfFriends_LTE: Int - rating: Float - rating_GT: Float - rating_GTE: Float - rating_IN: [Float!] - rating_LT: Float - rating_LTE: Float - toBeOverridden: String - toBeOverridden_CONTAINS: String - toBeOverridden_ENDS_WITH: String - toBeOverridden_IN: [String!] - toBeOverridden_STARTS_WITH: String - verified: Boolean - verifiedDate: DateTime - verifiedDate_GT: DateTime - verifiedDate_GTE: DateTime - verifiedDate_IN: [DateTime!] - verifiedDate_LT: DateTime - verifiedDate_LTE: DateTime -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/filterable.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/filterable.adoc deleted file mode 100644 index 0c061f0b..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/filterable.adoc +++ /dev/null @@ -1,2077 +0,0 @@ -:toc: -:toclevels: 42 - -= @filterable directive - -== on INTERFACE RELATIONSHIP FIELD, (aggregation are not generated for abstract types) - -=== disable value filters - -.Schema -[source,graphql,schema=true] ----- -type Actor implements Person { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} - -interface Person { - username: String! -} - -type Movie { - title: String - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable(byValue: false) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -interface Person { - username: String! -} - -type Actor implements Person { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -enum PersonImplementation { - Actor -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere -} - -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - -"Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." -input ActorSort { - password: SortDirection - username: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - "Return Actors where all of the related ActorMoviesConnections match this filter" - moviesConnection_ALL: ActorMoviesConnectionWhere - "Return Actors where none of the related ActorMoviesConnections match this filter" - moviesConnection_NONE: ActorMoviesConnectionWhere - "Return Actors where one of the related ActorMoviesConnections match this filter" - moviesConnection_SINGLE: ActorMoviesConnectionWhere - "Return Actors where some of the related ActorMoviesConnections match this filter" - moviesConnection_SOME: ActorMoviesConnectionWhere - "Return Actors where all of the related Movies match this filter" - movies_ALL: MovieWhere - "Return Actors where none of the related Movies match this filter" - movies_NONE: MovieWhere - "Return Actors where one of the related Movies match this filter" - movies_SINGLE: MovieWhere - "Return Actors where some of the related Movies match this filter" - movies_SOME: MovieWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort] -} - -"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." -input PersonSort { - username: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - typename_IN: [PersonImplementation!] - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - ----- - -== snapshot tests - -=== on SCALAR - -==== default arguments should disable aggregation - -.Schema -[source,graphql,schema=true] ----- -type Actor { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} - -type Movie { - title: String @filterable - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere -} - -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - -"Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." -input ActorSort { - password: SortDirection - username: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - "Return Actors where all of the related ActorMoviesConnections match this filter" - moviesConnection_ALL: ActorMoviesConnectionWhere - "Return Actors where none of the related ActorMoviesConnections match this filter" - moviesConnection_NONE: ActorMoviesConnectionWhere - "Return Actors where one of the related ActorMoviesConnections match this filter" - moviesConnection_SINGLE: ActorMoviesConnectionWhere - "Return Actors where some of the related ActorMoviesConnections match this filter" - moviesConnection_SOME: ActorMoviesConnectionWhere - "Return Actors where all of the related Movies match this filter" - movies_ALL: MovieWhere - "Return Actors where none of the related Movies match this filter" - movies_NONE: MovieWhere - "Return Actors where one of the related Movies match this filter" - movies_SINGLE: MovieWhere - "Return Actors where some of the related Movies match this filter" - movies_SOME: MovieWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related Actors match this filter" - actors_ALL: ActorWhere - "Return Movies where none of the related Actors match this filter" - actors_NONE: ActorWhere - "Return Movies where one of the related Actors match this filter" - actors_SINGLE: ActorWhere - "Return Movies where some of the related Actors match this filter" - actors_SOME: ActorWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - ----- - -=== on RELATIONSHIP FIELD - -==== default arguments should disable aggregation - -.Schema -[source,graphql,schema=true] ----- -type Actor { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} - -type Movie { - title: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) @filterable -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere -} - -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - -"Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." -input ActorSort { - password: SortDirection - username: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - "Return Actors where all of the related ActorMoviesConnections match this filter" - moviesConnection_ALL: ActorMoviesConnectionWhere - "Return Actors where none of the related ActorMoviesConnections match this filter" - moviesConnection_NONE: ActorMoviesConnectionWhere - "Return Actors where one of the related ActorMoviesConnections match this filter" - moviesConnection_SINGLE: ActorMoviesConnectionWhere - "Return Actors where some of the related ActorMoviesConnections match this filter" - moviesConnection_SOME: ActorMoviesConnectionWhere - "Return Actors where all of the related Movies match this filter" - movies_ALL: MovieWhere - "Return Actors where none of the related Movies match this filter" - movies_NONE: MovieWhere - "Return Actors where one of the related Movies match this filter" - movies_SINGLE: MovieWhere - "Return Actors where some of the related Movies match this filter" - movies_SOME: MovieWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related Actors match this filter" - actors_ALL: ActorWhere - "Return Movies where none of the related Actors match this filter" - actors_NONE: ActorWhere - "Return Movies where one of the related Actors match this filter" - actors_SINGLE: ActorWhere - "Return Movies where some of the related Actors match this filter" - actors_SOME: ActorWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - ----- - -==== enable only value filters - -.Schema -[source,graphql,schema=true] ----- -type Actor { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} - -type Movie { - title: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) @filterable(byValue: true) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere -} - -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - -"Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." -input ActorSort { - password: SortDirection - username: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - "Return Actors where all of the related ActorMoviesConnections match this filter" - moviesConnection_ALL: ActorMoviesConnectionWhere - "Return Actors where none of the related ActorMoviesConnections match this filter" - moviesConnection_NONE: ActorMoviesConnectionWhere - "Return Actors where one of the related ActorMoviesConnections match this filter" - moviesConnection_SINGLE: ActorMoviesConnectionWhere - "Return Actors where some of the related ActorMoviesConnections match this filter" - moviesConnection_SOME: ActorMoviesConnectionWhere - "Return Actors where all of the related Movies match this filter" - movies_ALL: MovieWhere - "Return Actors where none of the related Movies match this filter" - movies_NONE: MovieWhere - "Return Actors where one of the related Movies match this filter" - movies_SINGLE: MovieWhere - "Return Actors where some of the related Movies match this filter" - movies_SOME: MovieWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related Actors match this filter" - actors_ALL: ActorWhere - "Return Movies where none of the related Actors match this filter" - actors_NONE: ActorWhere - "Return Movies where one of the related Actors match this filter" - actors_SINGLE: ActorWhere - "Return Movies where some of the related Actors match this filter" - actors_SOME: ActorWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - ----- - -=== on INTERFACE RELATIONSHIP FIELD, (aggregation does not exists on abstract types) - -==== default arguments should disable aggregation - -.Schema -[source,graphql,schema=true] ----- -type Actor implements Person { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} - -interface Person { - username: String! -} - -type Movie { - title: String - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -interface Person { - username: String! -} - -type Actor implements Person { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -enum PersonImplementation { - Actor -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere -} - -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - -"Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." -input ActorSort { - password: SortDirection - username: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - "Return Actors where all of the related ActorMoviesConnections match this filter" - moviesConnection_ALL: ActorMoviesConnectionWhere - "Return Actors where none of the related ActorMoviesConnections match this filter" - moviesConnection_NONE: ActorMoviesConnectionWhere - "Return Actors where one of the related ActorMoviesConnections match this filter" - moviesConnection_SINGLE: ActorMoviesConnectionWhere - "Return Actors where some of the related ActorMoviesConnections match this filter" - moviesConnection_SOME: ActorMoviesConnectionWhere - "Return Actors where all of the related Movies match this filter" - movies_ALL: MovieWhere - "Return Actors where none of the related Movies match this filter" - movies_NONE: MovieWhere - "Return Actors where one of the related Movies match this filter" - movies_SINGLE: MovieWhere - "Return Actors where some of the related Movies match this filter" - movies_SOME: MovieWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort] -} - -"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." -input PersonSort { - username: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - typename_IN: [PersonImplementation!] - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - ----- - -==== enable only value filters - -.Schema -[source,graphql,schema=true] ----- -type Actor implements Person { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} - -interface Person { - username: String! -} - -type Movie { - title: String - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable(byValue: true) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -interface Person { - username: String! -} - -type Actor implements Person { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -enum PersonImplementation { - Actor -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere -} - -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - -"Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." -input ActorSort { - password: SortDirection - username: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - "Return Actors where all of the related ActorMoviesConnections match this filter" - moviesConnection_ALL: ActorMoviesConnectionWhere - "Return Actors where none of the related ActorMoviesConnections match this filter" - moviesConnection_NONE: ActorMoviesConnectionWhere - "Return Actors where one of the related ActorMoviesConnections match this filter" - moviesConnection_SINGLE: ActorMoviesConnectionWhere - "Return Actors where some of the related ActorMoviesConnections match this filter" - moviesConnection_SOME: ActorMoviesConnectionWhere - "Return Actors where all of the related Movies match this filter" - movies_ALL: MovieWhere - "Return Actors where none of the related Movies match this filter" - movies_NONE: MovieWhere - "Return Actors where one of the related Movies match this filter" - movies_SINGLE: MovieWhere - "Return Actors where some of the related Movies match this filter" - movies_SOME: MovieWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort] -} - -"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." -input PersonSort { - username: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - typename_IN: [PersonImplementation!] - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - ----- - -=== on UNION RELATIONSHIP FIELD, (aggregation does not exists on abstract types) - -==== default arguments should disable aggregation - -.Schema -[source,graphql,schema=true] ----- -type Actor { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} - -type Appearance { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} - -union Person = Actor | Appearance - -type Movie { - title: String - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -union Person = Actor | Appearance - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Appearance { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! - password: String! - username: String! -} - -type AppearanceEdge { - cursor: String! - node: Appearance! -} - -type AppearanceMoviesConnection { - edges: [AppearanceMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type AppearanceMoviesRelationship { - cursor: String! - node: Movie! -} - -type AppearancesConnection { - edges: [AppearanceEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - appearances(options: AppearanceOptions, where: AppearanceWhere): [Appearance!]! - appearancesConnection(after: String, first: Int, sort: [AppearanceSort], where: AppearanceWhere): AppearancesConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere -} - -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - -"Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." -input ActorSort { - password: SortDirection - username: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - "Return Actors where all of the related ActorMoviesConnections match this filter" - moviesConnection_ALL: ActorMoviesConnectionWhere - "Return Actors where none of the related ActorMoviesConnections match this filter" - moviesConnection_NONE: ActorMoviesConnectionWhere - "Return Actors where one of the related ActorMoviesConnections match this filter" - moviesConnection_SINGLE: ActorMoviesConnectionWhere - "Return Actors where some of the related ActorMoviesConnections match this filter" - moviesConnection_SOME: ActorMoviesConnectionWhere - "Return Actors where all of the related Movies match this filter" - movies_ALL: MovieWhere - "Return Actors where none of the related Movies match this filter" - movies_NONE: MovieWhere - "Return Actors where one of the related Movies match this filter" - movies_SINGLE: MovieWhere - "Return Actors where some of the related Movies match this filter" - movies_SOME: MovieWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -input AppearanceMoviesConnectionSort { - node: MovieSort -} - -input AppearanceMoviesConnectionWhere { - AND: [AppearanceMoviesConnectionWhere!] - NOT: AppearanceMoviesConnectionWhere - OR: [AppearanceMoviesConnectionWhere!] - node: MovieWhere -} - -input AppearanceOptions { - limit: Int - offset: Int - "Specify one or more AppearanceSort objects to sort Appearances by. The sorts will be applied in the order in which they are arranged in the array." - sort: [AppearanceSort!] -} - -"Fields to sort Appearances by. The order in which sorts are applied is not guaranteed when specifying many fields in one AppearanceSort object." -input AppearanceSort { - password: SortDirection - username: SortDirection -} - -input AppearanceWhere { - AND: [AppearanceWhere!] - NOT: AppearanceWhere - OR: [AppearanceWhere!] - "Return Appearances where all of the related AppearanceMoviesConnections match this filter" - moviesConnection_ALL: AppearanceMoviesConnectionWhere - "Return Appearances where none of the related AppearanceMoviesConnections match this filter" - moviesConnection_NONE: AppearanceMoviesConnectionWhere - "Return Appearances where one of the related AppearanceMoviesConnections match this filter" - moviesConnection_SINGLE: AppearanceMoviesConnectionWhere - "Return Appearances where some of the related AppearanceMoviesConnections match this filter" - moviesConnection_SOME: AppearanceMoviesConnectionWhere - "Return Appearances where all of the related Movies match this filter" - movies_ALL: MovieWhere - "Return Appearances where none of the related Movies match this filter" - movies_NONE: MovieWhere - "Return Appearances where one of the related Movies match this filter" - movies_SINGLE: MovieWhere - "Return Appearances where some of the related Movies match this filter" - movies_SOME: MovieWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -input MovieActorsActorConnectionWhere { - AND: [MovieActorsActorConnectionWhere!] - NOT: MovieActorsActorConnectionWhere - OR: [MovieActorsActorConnectionWhere!] - node: ActorWhere -} - -input MovieActorsAppearanceConnectionWhere { - AND: [MovieActorsAppearanceConnectionWhere!] - NOT: MovieActorsAppearanceConnectionWhere - OR: [MovieActorsAppearanceConnectionWhere!] - node: AppearanceWhere -} - -input MovieActorsConnectionWhere { - Actor: MovieActorsActorConnectionWhere - Appearance: MovieActorsAppearanceConnectionWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - -input PersonWhere { - Actor: ActorWhere - Appearance: AppearanceWhere -} - -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - ----- - -==== enable only value filters - -.Schema -[source,graphql,schema=true] ----- -type Actor { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} - -type Appearance { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} - -union Person = Actor | Appearance - -type Movie { - title: String - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable(byValue: true) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -union Person = Actor | Appearance - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Appearance { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! - password: String! - username: String! -} - -type AppearanceEdge { - cursor: String! - node: Appearance! -} - -type AppearanceMoviesConnection { - edges: [AppearanceMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type AppearanceMoviesRelationship { - cursor: String! - node: Movie! -} - -type AppearancesConnection { - edges: [AppearanceEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - appearances(options: AppearanceOptions, where: AppearanceWhere): [Appearance!]! - appearancesConnection(after: String, first: Int, sort: [AppearanceSort], where: AppearanceWhere): AppearancesConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere -} - -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - -"Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." -input ActorSort { - password: SortDirection - username: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - "Return Actors where all of the related ActorMoviesConnections match this filter" - moviesConnection_ALL: ActorMoviesConnectionWhere - "Return Actors where none of the related ActorMoviesConnections match this filter" - moviesConnection_NONE: ActorMoviesConnectionWhere - "Return Actors where one of the related ActorMoviesConnections match this filter" - moviesConnection_SINGLE: ActorMoviesConnectionWhere - "Return Actors where some of the related ActorMoviesConnections match this filter" - moviesConnection_SOME: ActorMoviesConnectionWhere - "Return Actors where all of the related Movies match this filter" - movies_ALL: MovieWhere - "Return Actors where none of the related Movies match this filter" - movies_NONE: MovieWhere - "Return Actors where one of the related Movies match this filter" - movies_SINGLE: MovieWhere - "Return Actors where some of the related Movies match this filter" - movies_SOME: MovieWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -input AppearanceMoviesConnectionSort { - node: MovieSort -} - -input AppearanceMoviesConnectionWhere { - AND: [AppearanceMoviesConnectionWhere!] - NOT: AppearanceMoviesConnectionWhere - OR: [AppearanceMoviesConnectionWhere!] - node: MovieWhere -} - -input AppearanceOptions { - limit: Int - offset: Int - "Specify one or more AppearanceSort objects to sort Appearances by. The sorts will be applied in the order in which they are arranged in the array." - sort: [AppearanceSort!] -} - -"Fields to sort Appearances by. The order in which sorts are applied is not guaranteed when specifying many fields in one AppearanceSort object." -input AppearanceSort { - password: SortDirection - username: SortDirection -} - -input AppearanceWhere { - AND: [AppearanceWhere!] - NOT: AppearanceWhere - OR: [AppearanceWhere!] - "Return Appearances where all of the related AppearanceMoviesConnections match this filter" - moviesConnection_ALL: AppearanceMoviesConnectionWhere - "Return Appearances where none of the related AppearanceMoviesConnections match this filter" - moviesConnection_NONE: AppearanceMoviesConnectionWhere - "Return Appearances where one of the related AppearanceMoviesConnections match this filter" - moviesConnection_SINGLE: AppearanceMoviesConnectionWhere - "Return Appearances where some of the related AppearanceMoviesConnections match this filter" - moviesConnection_SOME: AppearanceMoviesConnectionWhere - "Return Appearances where all of the related Movies match this filter" - movies_ALL: MovieWhere - "Return Appearances where none of the related Movies match this filter" - movies_NONE: MovieWhere - "Return Appearances where one of the related Movies match this filter" - movies_SINGLE: MovieWhere - "Return Appearances where some of the related Movies match this filter" - movies_SOME: MovieWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -input MovieActorsActorConnectionWhere { - AND: [MovieActorsActorConnectionWhere!] - NOT: MovieActorsActorConnectionWhere - OR: [MovieActorsActorConnectionWhere!] - node: ActorWhere -} - -input MovieActorsAppearanceConnectionWhere { - AND: [MovieActorsAppearanceConnectionWhere!] - NOT: MovieActorsAppearanceConnectionWhere - OR: [MovieActorsAppearanceConnectionWhere!] - node: AppearanceWhere -} - -input MovieActorsConnectionWhere { - Actor: MovieActorsActorConnectionWhere - Appearance: MovieActorsAppearanceConnectionWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - -input PersonWhere { - Actor: ActorWhere - Appearance: AppearanceWhere -} - -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/filterable.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/filterable.js.adoc deleted file mode 100644 index d19062ef..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/filterable.js.adoc +++ /dev/null @@ -1,2290 +0,0 @@ -// This file was generated by the Test-Case extractor of neo4j-graphql -:toc: -:toclevels: 42 - -= @filterable directive - -== on INTERFACE RELATIONSHIP FIELD, (aggregation are not generated for abstract types) - -=== disable value filters - -.Schema -[source,graphql,schema=true] ----- -type Actor implements Person { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} - -interface Person { - username: String! -} - -type Movie { - title: String - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable(byValue: false) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Actor implements Person { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - -""" -Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. -""" -input ActorSort { - password: SortDirection - username: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - """ - Return Actors where all of the related ActorMoviesConnections match this filter - """ - moviesConnection_ALL: ActorMoviesConnectionWhere - """ - Return Actors where none of the related ActorMoviesConnections match this filter - """ - moviesConnection_NONE: ActorMoviesConnectionWhere - """ - Return Actors where one of the related ActorMoviesConnections match this filter - """ - moviesConnection_SINGLE: ActorMoviesConnectionWhere - """ - Return Actors where some of the related ActorMoviesConnections match this filter - """ - moviesConnection_SOME: ActorMoviesConnectionWhere - """Return Actors where all of the related Movies match this filter""" - movies_ALL: MovieWhere - """Return Actors where none of the related Movies match this filter""" - movies_NONE: MovieWhere - """Return Actors where one of the related Movies match this filter""" - movies_SINGLE: MovieWhere - """Return Actors where some of the related Movies match this filter""" - movies_SOME: MovieWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -interface Person { - username: String! -} - -type PersonEdge { - cursor: String! - node: Person! -} - -enum PersonImplementation { - Actor -} - -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort] -} - -""" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -""" -input PersonSort { - username: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - typename_IN: [PersonImplementation!] - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -== snapshot tests - -=== on SCALAR - -==== default arguments should disable aggregation - -.Schema -[source,graphql,schema=true] ----- -type Actor { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} - -type Movie { - title: String @filterable - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - -""" -Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. -""" -input ActorSort { - password: SortDirection - username: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - """ - Return Actors where all of the related ActorMoviesConnections match this filter - """ - moviesConnection_ALL: ActorMoviesConnectionWhere - """ - Return Actors where none of the related ActorMoviesConnections match this filter - """ - moviesConnection_NONE: ActorMoviesConnectionWhere - """ - Return Actors where one of the related ActorMoviesConnections match this filter - """ - moviesConnection_SINGLE: ActorMoviesConnectionWhere - """ - Return Actors where some of the related ActorMoviesConnections match this filter - """ - moviesConnection_SOME: ActorMoviesConnectionWhere - """Return Actors where all of the related Movies match this filter""" - movies_ALL: MovieWhere - """Return Actors where none of the related Movies match this filter""" - movies_NONE: MovieWhere - """Return Actors where one of the related Movies match this filter""" - movies_SINGLE: MovieWhere - """Return Actors where some of the related Movies match this filter""" - movies_SOME: MovieWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related Actors match this filter""" - actors_ALL: ActorWhere - """Return Movies where none of the related Actors match this filter""" - actors_NONE: ActorWhere - """Return Movies where one of the related Actors match this filter""" - actors_SINGLE: ActorWhere - """Return Movies where some of the related Actors match this filter""" - actors_SOME: ActorWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== on RELATIONSHIP FIELD - -==== default arguments should disable aggregation - -.Schema -[source,graphql,schema=true] ----- -type Actor { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} - -type Movie { - title: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) @filterable -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - -""" -Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. -""" -input ActorSort { - password: SortDirection - username: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - """ - Return Actors where all of the related ActorMoviesConnections match this filter - """ - moviesConnection_ALL: ActorMoviesConnectionWhere - """ - Return Actors where none of the related ActorMoviesConnections match this filter - """ - moviesConnection_NONE: ActorMoviesConnectionWhere - """ - Return Actors where one of the related ActorMoviesConnections match this filter - """ - moviesConnection_SINGLE: ActorMoviesConnectionWhere - """ - Return Actors where some of the related ActorMoviesConnections match this filter - """ - moviesConnection_SOME: ActorMoviesConnectionWhere - """Return Actors where all of the related Movies match this filter""" - movies_ALL: MovieWhere - """Return Actors where none of the related Movies match this filter""" - movies_NONE: MovieWhere - """Return Actors where one of the related Movies match this filter""" - movies_SINGLE: MovieWhere - """Return Actors where some of the related Movies match this filter""" - movies_SOME: MovieWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related Actors match this filter""" - actors_ALL: ActorWhere - """Return Movies where none of the related Actors match this filter""" - actors_NONE: ActorWhere - """Return Movies where one of the related Actors match this filter""" - actors_SINGLE: ActorWhere - """Return Movies where some of the related Actors match this filter""" - actors_SOME: ActorWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -==== enable only value filters - -.Schema -[source,graphql,schema=true] ----- -type Actor { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} - -type Movie { - title: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) @filterable(byValue: true) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - -""" -Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. -""" -input ActorSort { - password: SortDirection - username: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - """ - Return Actors where all of the related ActorMoviesConnections match this filter - """ - moviesConnection_ALL: ActorMoviesConnectionWhere - """ - Return Actors where none of the related ActorMoviesConnections match this filter - """ - moviesConnection_NONE: ActorMoviesConnectionWhere - """ - Return Actors where one of the related ActorMoviesConnections match this filter - """ - moviesConnection_SINGLE: ActorMoviesConnectionWhere - """ - Return Actors where some of the related ActorMoviesConnections match this filter - """ - moviesConnection_SOME: ActorMoviesConnectionWhere - """Return Actors where all of the related Movies match this filter""" - movies_ALL: MovieWhere - """Return Actors where none of the related Movies match this filter""" - movies_NONE: MovieWhere - """Return Actors where one of the related Movies match this filter""" - movies_SINGLE: MovieWhere - """Return Actors where some of the related Movies match this filter""" - movies_SOME: MovieWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related Actors match this filter""" - actors_ALL: ActorWhere - """Return Movies where none of the related Actors match this filter""" - actors_NONE: ActorWhere - """Return Movies where one of the related Actors match this filter""" - actors_SINGLE: ActorWhere - """Return Movies where some of the related Actors match this filter""" - actors_SOME: ActorWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== on INTERFACE RELATIONSHIP FIELD, (aggregation does not exists on abstract types) - -==== default arguments should disable aggregation - -.Schema -[source,graphql,schema=true] ----- -type Actor implements Person { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} - -interface Person { - username: String! -} - -type Movie { - title: String - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Actor implements Person { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - -""" -Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. -""" -input ActorSort { - password: SortDirection - username: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - """ - Return Actors where all of the related ActorMoviesConnections match this filter - """ - moviesConnection_ALL: ActorMoviesConnectionWhere - """ - Return Actors where none of the related ActorMoviesConnections match this filter - """ - moviesConnection_NONE: ActorMoviesConnectionWhere - """ - Return Actors where one of the related ActorMoviesConnections match this filter - """ - moviesConnection_SINGLE: ActorMoviesConnectionWhere - """ - Return Actors where some of the related ActorMoviesConnections match this filter - """ - moviesConnection_SOME: ActorMoviesConnectionWhere - """Return Actors where all of the related Movies match this filter""" - movies_ALL: MovieWhere - """Return Actors where none of the related Movies match this filter""" - movies_NONE: MovieWhere - """Return Actors where one of the related Movies match this filter""" - movies_SINGLE: MovieWhere - """Return Actors where some of the related Movies match this filter""" - movies_SOME: MovieWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -interface Person { - username: String! -} - -type PersonEdge { - cursor: String! - node: Person! -} - -enum PersonImplementation { - Actor -} - -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort] -} - -""" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -""" -input PersonSort { - username: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - typename_IN: [PersonImplementation!] - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -==== enable only value filters - -.Schema -[source,graphql,schema=true] ----- -type Actor implements Person { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} - -interface Person { - username: String! -} - -type Movie { - title: String - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable(byValue: true) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Actor implements Person { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - -""" -Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. -""" -input ActorSort { - password: SortDirection - username: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - """ - Return Actors where all of the related ActorMoviesConnections match this filter - """ - moviesConnection_ALL: ActorMoviesConnectionWhere - """ - Return Actors where none of the related ActorMoviesConnections match this filter - """ - moviesConnection_NONE: ActorMoviesConnectionWhere - """ - Return Actors where one of the related ActorMoviesConnections match this filter - """ - moviesConnection_SINGLE: ActorMoviesConnectionWhere - """ - Return Actors where some of the related ActorMoviesConnections match this filter - """ - moviesConnection_SOME: ActorMoviesConnectionWhere - """Return Actors where all of the related Movies match this filter""" - movies_ALL: MovieWhere - """Return Actors where none of the related Movies match this filter""" - movies_NONE: MovieWhere - """Return Actors where one of the related Movies match this filter""" - movies_SINGLE: MovieWhere - """Return Actors where some of the related Movies match this filter""" - movies_SOME: MovieWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -interface Person { - username: String! -} - -type PersonEdge { - cursor: String! - node: Person! -} - -enum PersonImplementation { - Actor -} - -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort] -} - -""" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -""" -input PersonSort { - username: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - typename_IN: [PersonImplementation!] - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== on UNION RELATIONSHIP FIELD, (aggregation does not exists on abstract types) - -==== default arguments should disable aggregation - -.Schema -[source,graphql,schema=true] ----- -type Actor { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} - -type Appearance { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} - -union Person = Actor | Appearance - -type Movie { - title: String - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - -""" -Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. -""" -input ActorSort { - password: SortDirection - username: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - """ - Return Actors where all of the related ActorMoviesConnections match this filter - """ - moviesConnection_ALL: ActorMoviesConnectionWhere - """ - Return Actors where none of the related ActorMoviesConnections match this filter - """ - moviesConnection_NONE: ActorMoviesConnectionWhere - """ - Return Actors where one of the related ActorMoviesConnections match this filter - """ - moviesConnection_SINGLE: ActorMoviesConnectionWhere - """ - Return Actors where some of the related ActorMoviesConnections match this filter - """ - moviesConnection_SOME: ActorMoviesConnectionWhere - """Return Actors where all of the related Movies match this filter""" - movies_ALL: MovieWhere - """Return Actors where none of the related Movies match this filter""" - movies_NONE: MovieWhere - """Return Actors where one of the related Movies match this filter""" - movies_SINGLE: MovieWhere - """Return Actors where some of the related Movies match this filter""" - movies_SOME: MovieWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Appearance { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! - password: String! - username: String! -} - -type AppearanceEdge { - cursor: String! - node: Appearance! -} - -type AppearanceMoviesConnection { - edges: [AppearanceMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input AppearanceMoviesConnectionSort { - node: MovieSort -} - -input AppearanceMoviesConnectionWhere { - AND: [AppearanceMoviesConnectionWhere!] - NOT: AppearanceMoviesConnectionWhere - OR: [AppearanceMoviesConnectionWhere!] - node: MovieWhere -} - -type AppearanceMoviesRelationship { - cursor: String! - node: Movie! -} - -input AppearanceOptions { - limit: Int - offset: Int - """ - Specify one or more AppearanceSort objects to sort Appearances by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [AppearanceSort!] -} - -""" -Fields to sort Appearances by. The order in which sorts are applied is not guaranteed when specifying many fields in one AppearanceSort object. -""" -input AppearanceSort { - password: SortDirection - username: SortDirection -} - -input AppearanceWhere { - AND: [AppearanceWhere!] - NOT: AppearanceWhere - OR: [AppearanceWhere!] - """ - Return Appearances where all of the related AppearanceMoviesConnections match this filter - """ - moviesConnection_ALL: AppearanceMoviesConnectionWhere - """ - Return Appearances where none of the related AppearanceMoviesConnections match this filter - """ - moviesConnection_NONE: AppearanceMoviesConnectionWhere - """ - Return Appearances where one of the related AppearanceMoviesConnections match this filter - """ - moviesConnection_SINGLE: AppearanceMoviesConnectionWhere - """ - Return Appearances where some of the related AppearanceMoviesConnections match this filter - """ - moviesConnection_SOME: AppearanceMoviesConnectionWhere - """Return Appearances where all of the related Movies match this filter""" - movies_ALL: MovieWhere - """Return Appearances where none of the related Movies match this filter""" - movies_NONE: MovieWhere - """Return Appearances where one of the related Movies match this filter""" - movies_SINGLE: MovieWhere - """Return Appearances where some of the related Movies match this filter""" - movies_SOME: MovieWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -type AppearancesConnection { - edges: [AppearanceEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -input MovieActorsActorConnectionWhere { - AND: [MovieActorsActorConnectionWhere!] - NOT: MovieActorsActorConnectionWhere - OR: [MovieActorsActorConnectionWhere!] - node: ActorWhere -} - -input MovieActorsAppearanceConnectionWhere { - AND: [MovieActorsAppearanceConnectionWhere!] - NOT: MovieActorsAppearanceConnectionWhere - OR: [MovieActorsAppearanceConnectionWhere!] - node: AppearanceWhere -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - Actor: MovieActorsActorConnectionWhere - Appearance: MovieActorsAppearanceConnectionWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Person = Actor | Appearance - -input PersonWhere { - Actor: ActorWhere - Appearance: AppearanceWhere -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - appearances(options: AppearanceOptions, where: AppearanceWhere): [Appearance!]! - appearancesConnection(after: String, first: Int, sort: [AppearanceSort], where: AppearanceWhere): AppearancesConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -==== enable only value filters - -.Schema -[source,graphql,schema=true] ----- -type Actor { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} - -type Appearance { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} - -union Person = Actor | Appearance - -type Movie { - title: String - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable(byValue: true) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - -""" -Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. -""" -input ActorSort { - password: SortDirection - username: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - """ - Return Actors where all of the related ActorMoviesConnections match this filter - """ - moviesConnection_ALL: ActorMoviesConnectionWhere - """ - Return Actors where none of the related ActorMoviesConnections match this filter - """ - moviesConnection_NONE: ActorMoviesConnectionWhere - """ - Return Actors where one of the related ActorMoviesConnections match this filter - """ - moviesConnection_SINGLE: ActorMoviesConnectionWhere - """ - Return Actors where some of the related ActorMoviesConnections match this filter - """ - moviesConnection_SOME: ActorMoviesConnectionWhere - """Return Actors where all of the related Movies match this filter""" - movies_ALL: MovieWhere - """Return Actors where none of the related Movies match this filter""" - movies_NONE: MovieWhere - """Return Actors where one of the related Movies match this filter""" - movies_SINGLE: MovieWhere - """Return Actors where some of the related Movies match this filter""" - movies_SOME: MovieWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Appearance { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! - password: String! - username: String! -} - -type AppearanceEdge { - cursor: String! - node: Appearance! -} - -type AppearanceMoviesConnection { - edges: [AppearanceMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input AppearanceMoviesConnectionSort { - node: MovieSort -} - -input AppearanceMoviesConnectionWhere { - AND: [AppearanceMoviesConnectionWhere!] - NOT: AppearanceMoviesConnectionWhere - OR: [AppearanceMoviesConnectionWhere!] - node: MovieWhere -} - -type AppearanceMoviesRelationship { - cursor: String! - node: Movie! -} - -input AppearanceOptions { - limit: Int - offset: Int - """ - Specify one or more AppearanceSort objects to sort Appearances by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [AppearanceSort!] -} - -""" -Fields to sort Appearances by. The order in which sorts are applied is not guaranteed when specifying many fields in one AppearanceSort object. -""" -input AppearanceSort { - password: SortDirection - username: SortDirection -} - -input AppearanceWhere { - AND: [AppearanceWhere!] - NOT: AppearanceWhere - OR: [AppearanceWhere!] - """ - Return Appearances where all of the related AppearanceMoviesConnections match this filter - """ - moviesConnection_ALL: AppearanceMoviesConnectionWhere - """ - Return Appearances where none of the related AppearanceMoviesConnections match this filter - """ - moviesConnection_NONE: AppearanceMoviesConnectionWhere - """ - Return Appearances where one of the related AppearanceMoviesConnections match this filter - """ - moviesConnection_SINGLE: AppearanceMoviesConnectionWhere - """ - Return Appearances where some of the related AppearanceMoviesConnections match this filter - """ - moviesConnection_SOME: AppearanceMoviesConnectionWhere - """Return Appearances where all of the related Movies match this filter""" - movies_ALL: MovieWhere - """Return Appearances where none of the related Movies match this filter""" - movies_NONE: MovieWhere - """Return Appearances where one of the related Movies match this filter""" - movies_SINGLE: MovieWhere - """Return Appearances where some of the related Movies match this filter""" - movies_SOME: MovieWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -type AppearancesConnection { - edges: [AppearanceEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -input MovieActorsActorConnectionWhere { - AND: [MovieActorsActorConnectionWhere!] - NOT: MovieActorsActorConnectionWhere - OR: [MovieActorsActorConnectionWhere!] - node: ActorWhere -} - -input MovieActorsAppearanceConnectionWhere { - AND: [MovieActorsAppearanceConnectionWhere!] - NOT: MovieActorsAppearanceConnectionWhere - OR: [MovieActorsAppearanceConnectionWhere!] - node: AppearanceWhere -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - Actor: MovieActorsActorConnectionWhere - Appearance: MovieActorsAppearanceConnectionWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Person = Actor | Appearance - -input PersonWhere { - Actor: ActorWhere - Appearance: AppearanceWhere -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - appearances(options: AppearanceOptions, where: AppearanceWhere): [Appearance!]! - appearancesConnection(after: String, first: Int, sort: [AppearanceSort], where: AppearanceWhere): AppearancesConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/private.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/private.adoc deleted file mode 100644 index d942b7eb..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/private.adoc +++ /dev/null @@ -1,271 +0,0 @@ -:toc: -:toclevels: 42 - -= @private directive - -== private is not inherited - -.Schema -[source,graphql,schema=true] ----- -interface UserInterface { - id: ID - private: String @private -} - -type User implements UserInterface { - id: ID - password: String @private - private: String -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -interface UserInterface { - id: ID -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - userInterfaces(options: UserInterfaceOptions, where: UserInterfaceWhere): [UserInterface!]! - userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort], where: UserInterfaceWhere): UserInterfacesConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -type User implements UserInterface { - id: ID - private: String -} - -type UserEdge { - cursor: String! - node: User! -} - -type UserInterfaceEdge { - cursor: String! - node: UserInterface! -} - -type UserInterfacesConnection { - edges: [UserInterfaceEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -enum UserInterfaceImplementation { - User -} - -input UserInterfaceOptions { - limit: Int - offset: Int - "Specify one or more UserInterfaceSort objects to sort UserInterfaces by. The sorts will be applied in the order in which they are arranged in the array." - sort: [UserInterfaceSort] -} - -"Fields to sort UserInterfaces by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserInterfaceSort object." -input UserInterfaceSort { - id: SortDirection -} - -input UserInterfaceWhere { - AND: [UserInterfaceWhere!] - NOT: UserInterfaceWhere - OR: [UserInterfaceWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - typename_IN: [UserInterfaceImplementation!] -} - -input UserOptions { - limit: Int - offset: Int - "Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array." - sort: [UserSort!] -} - -"Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object." -input UserSort { - id: SortDirection - private: SortDirection -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - private: String - private_CONTAINS: String - private_ENDS_WITH: String - private_IN: [String] - private_STARTS_WITH: String -} - ----- - -== does not add fields to schema - -.Schema -[source,graphql,schema=true] ----- -interface UserInterface { - id: ID - private: String @private -} - -type User implements UserInterface { - id: ID - password: String @private - private: String @private -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -interface UserInterface { - id: ID -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - userInterfaces(options: UserInterfaceOptions, where: UserInterfaceWhere): [UserInterface!]! - userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort], where: UserInterfaceWhere): UserInterfacesConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -type User implements UserInterface { - id: ID -} - -type UserEdge { - cursor: String! - node: User! -} - -type UserInterfaceEdge { - cursor: String! - node: UserInterface! -} - -type UserInterfacesConnection { - edges: [UserInterfaceEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -enum UserInterfaceImplementation { - User -} - -input UserInterfaceOptions { - limit: Int - offset: Int - "Specify one or more UserInterfaceSort objects to sort UserInterfaces by. The sorts will be applied in the order in which they are arranged in the array." - sort: [UserInterfaceSort] -} - -"Fields to sort UserInterfaces by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserInterfaceSort object." -input UserInterfaceSort { - id: SortDirection -} - -input UserInterfaceWhere { - AND: [UserInterfaceWhere!] - NOT: UserInterfaceWhere - OR: [UserInterfaceWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - typename_IN: [UserInterfaceImplementation!] -} - -input UserOptions { - limit: Int - offset: Int - "Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array." - sort: [UserSort!] -} - -"Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object." -input UserSort { - id: SortDirection -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/private.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/private.js.adoc deleted file mode 100644 index 4d04632f..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/private.js.adoc +++ /dev/null @@ -1,286 +0,0 @@ -// This file was generated by the Test-Case extractor of neo4j-graphql -:toc: -:toclevels: 42 - -= @private directive - -== private is not inherited - -.Schema -[source,graphql,schema=true] ----- -interface UserInterface { - id: ID - private: String @private -} - -type User implements UserInterface { - id: ID - password: String @private - private: String -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - userInterfaces(options: UserInterfaceOptions, where: UserInterfaceWhere): [UserInterface!]! - userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort], where: UserInterfaceWhere): UserInterfacesConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} - -type User implements UserInterface { - id: ID - private: String -} - -type UserEdge { - cursor: String! - node: User! -} - -interface UserInterface { - id: ID -} - -type UserInterfaceEdge { - cursor: String! - node: UserInterface! -} - -enum UserInterfaceImplementation { - User -} - -input UserInterfaceOptions { - limit: Int - offset: Int - """ - Specify one or more UserInterfaceSort objects to sort UserInterfaces by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [UserInterfaceSort] -} - -""" -Fields to sort UserInterfaces by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserInterfaceSort object. -""" -input UserInterfaceSort { - id: SortDirection -} - -input UserInterfaceWhere { - AND: [UserInterfaceWhere!] - NOT: UserInterfaceWhere - OR: [UserInterfaceWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - typename_IN: [UserInterfaceImplementation!] -} - -type UserInterfacesConnection { - edges: [UserInterfaceEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input UserOptions { - limit: Int - offset: Int - """ - Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [UserSort!] -} - -""" -Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. -""" -input UserSort { - id: SortDirection - private: SortDirection -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - private: String - private_CONTAINS: String - private_ENDS_WITH: String - private_IN: [String] - private_STARTS_WITH: String -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} ----- - -== does not add fields to schema - -.Schema -[source,graphql,schema=true] ----- -interface UserInterface { - id: ID - private: String @private -} - -type User implements UserInterface { - id: ID - password: String @private - private: String @private -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - userInterfaces(options: UserInterfaceOptions, where: UserInterfaceWhere): [UserInterface!]! - userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort], where: UserInterfaceWhere): UserInterfacesConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} - -type User implements UserInterface { - id: ID -} - -type UserEdge { - cursor: String! - node: User! -} - -interface UserInterface { - id: ID -} - -type UserInterfaceEdge { - cursor: String! - node: UserInterface! -} - -enum UserInterfaceImplementation { - User -} - -input UserInterfaceOptions { - limit: Int - offset: Int - """ - Specify one or more UserInterfaceSort objects to sort UserInterfaces by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [UserInterfaceSort] -} - -""" -Fields to sort UserInterfaces by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserInterfaceSort object. -""" -input UserInterfaceSort { - id: SortDirection -} - -input UserInterfaceWhere { - AND: [UserInterfaceWhere!] - NOT: UserInterfaceWhere - OR: [UserInterfaceWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - typename_IN: [UserInterfaceImplementation!] -} - -type UserInterfacesConnection { - edges: [UserInterfaceEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input UserOptions { - limit: Int - offset: Int - """ - Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [UserSort!] -} - -""" -Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. -""" -input UserSort { - id: SortDirection -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/relationship-aggregate.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/relationship-aggregate.adoc deleted file mode 100644 index f4448ffa..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/relationship-aggregate.adoc +++ /dev/null @@ -1,819 +0,0 @@ -:toc: -:toclevels: 42 - -= @relationship directive, aggregate argument - -== should disable nested aggregation - -.Schema -[source,graphql,schema=true] ----- -type Actor { - username: String! - password: String! -} - -type Movie { - title: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Actor { - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - -"Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." -input ActorSort { - password: SortDirection - username: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related Actors match this filter" - actors_ALL: ActorWhere - "Return Movies where none of the related Actors match this filter" - actors_NONE: ActorWhere - "Return Movies where one of the related Actors match this filter" - actors_SINGLE: ActorWhere - "Return Movies where some of the related Actors match this filter" - actors_SOME: ActorWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - ----- - -== snapshot tests - -=== aggregate argument set as false - -.Schema -[source,graphql,schema=true] ----- -type Actor { - username: String! - password: String! -} - -type Movie { - title: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Actor { - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - -"Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." -input ActorSort { - password: SortDirection - username: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related Actors match this filter" - actors_ALL: ActorWhere - "Return Movies where none of the related Actors match this filter" - actors_NONE: ActorWhere - "Return Movies where one of the related Actors match this filter" - actors_SINGLE: ActorWhere - "Return Movies where some of the related Actors match this filter" - actors_SOME: ActorWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - ----- - -=== on INTERFACE - -==== aggregate argument set as false, (no-op as abstract does not support aggregation) - -.Schema -[source,graphql,schema=true] ----- -type Actor implements Person { - username: String! - password: String! -} - -interface Person { - username: String! - password: String! -} - -type Movie { - title: String - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -interface Person { - password: String! - username: String! -} - -type Actor implements Person { - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -enum PersonImplementation { - Actor -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - -"Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." -input ActorSort { - password: SortDirection - username: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort] -} - -"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." -input PersonSort { - password: SortDirection - username: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - typename_IN: [PersonImplementation!] - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - ----- - -=== on UNION - -==== aggregate argument set as false, (no-op as abstract does not support aggregation) - -.Schema -[source,graphql,schema=true] ----- -type Actor { - username: String! - password: String! -} - -type Person { - name: String! -} - -union CastMember = Actor | Person - -type Movie { - title: String - actors: [CastMember!]! @relationship(type: "ACTED_IN", direction: IN) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -union CastMember = Actor | Person - -type Actor { - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: CastMemberWhere): [CastMember!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: CastMember! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String! -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - castMembers(options: QueryOptions, where: CastMemberWhere): [CastMember!]! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - -"Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." -input ActorSort { - password: SortDirection - username: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -input CastMemberWhere { - Actor: ActorWhere - Person: PersonWhere -} - -input MovieActorsActorConnectionWhere { - AND: [MovieActorsActorConnectionWhere!] - NOT: MovieActorsActorConnectionWhere - OR: [MovieActorsActorConnectionWhere!] - node: ActorWhere -} - -input MovieActorsConnectionWhere { - Actor: MovieActorsActorConnectionWhere - Person: MovieActorsPersonConnectionWhere -} - -input MovieActorsPersonConnectionWhere { - AND: [MovieActorsPersonConnectionWhere!] - NOT: MovieActorsPersonConnectionWhere - OR: [MovieActorsPersonConnectionWhere!] - node: PersonWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related CastMembers match this filter" - actors_ALL: CastMemberWhere - "Return Movies where none of the related CastMembers match this filter" - actors_NONE: CastMemberWhere - "Return Movies where one of the related CastMembers match this filter" - actors_SINGLE: CastMemberWhere - "Return Movies where some of the related CastMembers match this filter" - actors_SOME: CastMemberWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort!] -} - -"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." -input PersonSort { - name: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_STARTS_WITH: String -} - -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/relationship-aggregate.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/relationship-aggregate.js.adoc deleted file mode 100644 index b5c6940a..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/relationship-aggregate.js.adoc +++ /dev/null @@ -1,888 +0,0 @@ -// This file was generated by the Test-Case extractor of neo4j-graphql -:toc: -:toclevels: 42 - -= @relationship directive, aggregate argument - -== should disable nested aggregation - -.Schema -[source,graphql,schema=true] ----- -type Actor { - username: String! - password: String! -} - -type Movie { - title: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Actor { - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - -""" -Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. -""" -input ActorSort { - password: SortDirection - username: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related Actors match this filter""" - actors_ALL: ActorWhere - """Return Movies where none of the related Actors match this filter""" - actors_NONE: ActorWhere - """Return Movies where one of the related Actors match this filter""" - actors_SINGLE: ActorWhere - """Return Movies where some of the related Actors match this filter""" - actors_SOME: ActorWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -== snapshot tests - -=== aggregate argument set as false - -.Schema -[source,graphql,schema=true] ----- -type Actor { - username: String! - password: String! -} - -type Movie { - title: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Actor { - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - -""" -Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. -""" -input ActorSort { - password: SortDirection - username: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related Actors match this filter""" - actors_ALL: ActorWhere - """Return Movies where none of the related Actors match this filter""" - actors_NONE: ActorWhere - """Return Movies where one of the related Actors match this filter""" - actors_SINGLE: ActorWhere - """Return Movies where some of the related Actors match this filter""" - actors_SOME: ActorWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== on INTERFACE - -==== aggregate argument set as false, (no-op as abstract does not support aggregation) - -.Schema -[source,graphql,schema=true] ----- -type Actor implements Person { - username: String! - password: String! -} - -interface Person { - username: String! - password: String! -} - -type Movie { - title: String - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Actor implements Person { - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - -""" -Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. -""" -input ActorSort { - password: SortDirection - username: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -interface Person { - password: String! - username: String! -} - -type PersonEdge { - cursor: String! - node: Person! -} - -enum PersonImplementation { - Actor -} - -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort] -} - -""" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -""" -input PersonSort { - password: SortDirection - username: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - typename_IN: [PersonImplementation!] - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== on UNION - -==== aggregate argument set as false, (no-op as abstract does not support aggregation) - -.Schema -[source,graphql,schema=true] ----- -type Actor { - username: String! - password: String! -} - -type Person { - name: String! -} - -union CastMember = Actor | Person - -type Movie { - title: String - actors: [CastMember!]! @relationship(type: "ACTED_IN", direction: IN) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Actor { - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - -""" -Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. -""" -input ActorSort { - password: SortDirection - username: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -union CastMember = Actor | Person - -input CastMemberWhere { - Actor: ActorWhere - Person: PersonWhere -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: CastMemberWhere): [CastMember!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -input MovieActorsActorConnectionWhere { - AND: [MovieActorsActorConnectionWhere!] - NOT: MovieActorsActorConnectionWhere - OR: [MovieActorsActorConnectionWhere!] - node: ActorWhere -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - Actor: MovieActorsActorConnectionWhere - Person: MovieActorsPersonConnectionWhere -} - -input MovieActorsPersonConnectionWhere { - AND: [MovieActorsPersonConnectionWhere!] - NOT: MovieActorsPersonConnectionWhere - OR: [MovieActorsPersonConnectionWhere!] - node: PersonWhere -} - -type MovieActorsRelationship { - cursor: String! - node: CastMember! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related CastMembers match this filter""" - actors_ALL: CastMemberWhere - """Return Movies where none of the related CastMembers match this filter""" - actors_NONE: CastMemberWhere - """Return Movies where one of the related CastMembers match this filter""" - actors_SINGLE: CastMemberWhere - """Return Movies where some of the related CastMembers match this filter""" - actors_SOME: CastMemberWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String! -} - -type PersonEdge { - cursor: String! - node: Person! -} - -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort!] -} - -""" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -""" -input PersonSort { - name: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_STARTS_WITH: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - castMembers(options: QueryOptions, where: CastMemberWhere): [CastMember!]! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/relationship-nested-operations.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/relationship-nested-operations.adoc deleted file mode 100644 index a5cb6654..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/relationship-nested-operations.adoc +++ /dev/null @@ -1,5906 +0,0 @@ -:toc: -:toclevels: 42 - -= Relationship nested operations - -== Related to a concrete type - -=== Should not generate UpdateFieldInput input with no nested operations - -.Schema -[source,graphql,schema=true] ----- -type Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: []) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort!] -} - -"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." -input PersonSort { - name: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - ----- - -=== Single relationship with nested operation CREATE specified - -.Schema -[source,graphql,schema=true] ----- -type Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort!] -} - -"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." -input PersonSort { - name: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - ----- - -=== Single relationship with nested operation CONNECT specified - -.Schema -[source,graphql,schema=true] ----- -type Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort!] -} - -"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." -input PersonSort { - name: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - ----- - -=== Single relationship with nested operation UPDATE specified - -.Schema -[source,graphql,schema=true] ----- -type Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [UPDATE]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort!] -} - -"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." -input PersonSort { - name: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - ----- - -=== Single relationship with nested operation DELETE specified - -.Schema -[source,graphql,schema=true] ----- -type Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DELETE]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort!] -} - -"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." -input PersonSort { - name: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - ----- - -=== Single relationship with nested operation DISCONNECT specified - -.Schema -[source,graphql,schema=true] ----- -type Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DISCONNECT]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort!] -} - -"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." -input PersonSort { - name: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - ----- - -=== Should not generate any nested operations if only CONNECT_OR_CREATE is specified and the related type does not have a unique field - -.Schema -[source,graphql,schema=true] ----- -type Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT_OR_CREATE]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort!] -} - -"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." -input PersonSort { - name: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - ----- - -=== Two relationships with nested operations specified on one - -.Schema -[source,graphql,schema=true] ----- -type Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) - producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID - producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieProducersConnection { - edges: [MovieProducersRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieProducersRelationship { - cursor: String! - node: Person! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -input MovieProducersConnectionSort { - node: PersonSort -} - -input MovieProducersConnectionWhere { - AND: [MovieProducersConnectionWhere!] - NOT: MovieProducersConnectionWhere - OR: [MovieProducersConnectionWhere!] - node: PersonWhere -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - "Return Movies where all of the related MovieProducersConnections match this filter" - producersConnection_ALL: MovieProducersConnectionWhere - "Return Movies where none of the related MovieProducersConnections match this filter" - producersConnection_NONE: MovieProducersConnectionWhere - "Return Movies where one of the related MovieProducersConnections match this filter" - producersConnection_SINGLE: MovieProducersConnectionWhere - "Return Movies where some of the related MovieProducersConnections match this filter" - producersConnection_SOME: MovieProducersConnectionWhere - "Return Movies where all of the related People match this filter" - producers_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - producers_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - producers_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - producers_SOME: PersonWhere -} - -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort!] -} - -"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." -input PersonSort { - name: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - ----- - -=== Two relationships with nested operations specified on both - -.Schema -[source,graphql,schema=true] ----- -type Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) - producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID - producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieProducersConnection { - edges: [MovieProducersRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieProducersRelationship { - cursor: String! - node: Person! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -input MovieProducersConnectionSort { - node: PersonSort -} - -input MovieProducersConnectionWhere { - AND: [MovieProducersConnectionWhere!] - NOT: MovieProducersConnectionWhere - OR: [MovieProducersConnectionWhere!] - node: PersonWhere -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - "Return Movies where all of the related MovieProducersConnections match this filter" - producersConnection_ALL: MovieProducersConnectionWhere - "Return Movies where none of the related MovieProducersConnections match this filter" - producersConnection_NONE: MovieProducersConnectionWhere - "Return Movies where one of the related MovieProducersConnections match this filter" - producersConnection_SINGLE: MovieProducersConnectionWhere - "Return Movies where some of the related MovieProducersConnections match this filter" - producersConnection_SOME: MovieProducersConnectionWhere - "Return Movies where all of the related People match this filter" - producers_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - producers_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - producers_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - producers_SOME: PersonWhere -} - -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort!] -} - -"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." -input PersonSort { - name: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - ----- - -== Related to a union type - -=== Should not generate UpdateFieldInput input with no nested operations - -.Schema -[source,graphql,schema=true] ----- -type PersonOne { - name: String -} - -type PersonTwo { - nameTwo: String -} - -union Person = PersonOne | PersonTwo - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: []) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -union Person = PersonOne | PersonTwo - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PersonOne { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - -"Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - -"Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." -input PersonTwoSort { - nameTwo: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - ----- - -=== Single relationship with nested operation CREATE specified - -.Schema -[source,graphql,schema=true] ----- -type PersonOne { - name: String -} - -type PersonTwo { - nameTwo: String -} - -union Person = PersonOne | PersonTwo - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -union Person = PersonOne | PersonTwo - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PersonOne { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - -"Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - -"Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." -input PersonTwoSort { - nameTwo: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - ----- - -=== Single relationship with nested operation CONNECT specified - -.Schema -[source,graphql,schema=true] ----- -type PersonOne { - name: String -} - -type PersonTwo { - nameTwo: String -} - -union Person = PersonOne | PersonTwo - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -union Person = PersonOne | PersonTwo - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PersonOne { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - -"Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - -"Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." -input PersonTwoSort { - nameTwo: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - ----- - -=== Single relationship with nested operation UPDATE specified - -.Schema -[source,graphql,schema=true] ----- -type PersonOne { - name: String -} - -type PersonTwo { - nameTwo: String -} - -union Person = PersonOne | PersonTwo - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [UPDATE]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -union Person = PersonOne | PersonTwo - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PersonOne { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - -"Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - -"Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." -input PersonTwoSort { - nameTwo: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - ----- - -=== Single relationship with nested operation DELETE specified - -.Schema -[source,graphql,schema=true] ----- -type PersonOne { - name: String -} - -type PersonTwo { - nameTwo: String -} - -union Person = PersonOne | PersonTwo - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DELETE]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -union Person = PersonOne | PersonTwo - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PersonOne { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - -"Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - -"Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." -input PersonTwoSort { - nameTwo: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - ----- - -=== Single relationship with nested operation DISCONNECT specified - -.Schema -[source,graphql,schema=true] ----- -type PersonOne { - name: String -} - -type PersonTwo { - nameTwo: String -} - -union Person = PersonOne | PersonTwo - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DISCONNECT]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -union Person = PersonOne | PersonTwo - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PersonOne { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - -"Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - -"Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." -input PersonTwoSort { - nameTwo: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - ----- - -=== Should not generate any nested operations if only CONNECT_OR_CREATE is specified and the related type does not have a unique field - -.Schema -[source,graphql,schema=true] ----- -type PersonOne { - name: String -} - -type PersonTwo { - nameTwo: String -} - -union Person = PersonOne | PersonTwo - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT_OR_CREATE]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -union Person = PersonOne | PersonTwo - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PersonOne { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - -"Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - -"Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." -input PersonTwoSort { - nameTwo: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - ----- - -=== Two relationships with nested operations specified on one - -.Schema -[source,graphql,schema=true] ----- -type PersonOne { - name: String -} - -type PersonTwo { - nameTwo: String -} - -union Person = PersonOne | PersonTwo - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) - producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -union Person = PersonOne | PersonTwo - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID - producers(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, where: MovieProducersConnectionWhere): MovieProducersConnection! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieProducersConnection { - edges: [MovieProducersRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieProducersRelationship { - cursor: String! - node: Person! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PersonOne { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -input MovieProducersConnectionWhere { - PersonOne: MovieProducersPersonOneConnectionWhere - PersonTwo: MovieProducersPersonTwoConnectionWhere -} - -input MovieProducersPersonOneConnectionWhere { - AND: [MovieProducersPersonOneConnectionWhere!] - NOT: MovieProducersPersonOneConnectionWhere - OR: [MovieProducersPersonOneConnectionWhere!] - node: PersonOneWhere -} - -input MovieProducersPersonTwoConnectionWhere { - AND: [MovieProducersPersonTwoConnectionWhere!] - NOT: MovieProducersPersonTwoConnectionWhere - OR: [MovieProducersPersonTwoConnectionWhere!] - node: PersonTwoWhere -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - "Return Movies where all of the related MovieProducersConnections match this filter" - producersConnection_ALL: MovieProducersConnectionWhere - "Return Movies where none of the related MovieProducersConnections match this filter" - producersConnection_NONE: MovieProducersConnectionWhere - "Return Movies where one of the related MovieProducersConnections match this filter" - producersConnection_SINGLE: MovieProducersConnectionWhere - "Return Movies where some of the related MovieProducersConnections match this filter" - producersConnection_SOME: MovieProducersConnectionWhere - "Return Movies where all of the related People match this filter" - producers_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - producers_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - producers_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - producers_SOME: PersonWhere -} - -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - -"Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - -"Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." -input PersonTwoSort { - nameTwo: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - ----- - -=== Two relationships with nested operations specified on both - -.Schema -[source,graphql,schema=true] ----- -type PersonOne { - name: String -} - -type PersonTwo { - nameTwo: String -} - -union Person = PersonOne | PersonTwo - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) - producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -union Person = PersonOne | PersonTwo - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID - producers(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, where: MovieProducersConnectionWhere): MovieProducersConnection! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieProducersConnection { - edges: [MovieProducersRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieProducersRelationship { - cursor: String! - node: Person! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PersonOne { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -input MovieProducersConnectionWhere { - PersonOne: MovieProducersPersonOneConnectionWhere - PersonTwo: MovieProducersPersonTwoConnectionWhere -} - -input MovieProducersPersonOneConnectionWhere { - AND: [MovieProducersPersonOneConnectionWhere!] - NOT: MovieProducersPersonOneConnectionWhere - OR: [MovieProducersPersonOneConnectionWhere!] - node: PersonOneWhere -} - -input MovieProducersPersonTwoConnectionWhere { - AND: [MovieProducersPersonTwoConnectionWhere!] - NOT: MovieProducersPersonTwoConnectionWhere - OR: [MovieProducersPersonTwoConnectionWhere!] - node: PersonTwoWhere -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - "Return Movies where all of the related MovieProducersConnections match this filter" - producersConnection_ALL: MovieProducersConnectionWhere - "Return Movies where none of the related MovieProducersConnections match this filter" - producersConnection_NONE: MovieProducersConnectionWhere - "Return Movies where one of the related MovieProducersConnections match this filter" - producersConnection_SINGLE: MovieProducersConnectionWhere - "Return Movies where some of the related MovieProducersConnections match this filter" - producersConnection_SOME: MovieProducersConnectionWhere - "Return Movies where all of the related People match this filter" - producers_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - producers_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - producers_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - producers_SOME: PersonWhere -} - -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - -"Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - -"Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." -input PersonTwoSort { - nameTwo: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - ----- - -== Related to an interface type - -=== Should not generate UpdateFieldInput input with no nested operations - -.Schema -[source,graphql,schema=true] ----- -interface Person { - name: String -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonTwo implements Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: []) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -interface Person { - name: String -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo implements Person { - name: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -enum PersonImplementation { - PersonOne - PersonTwo -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - -"Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int -} - -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort] -} - -"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." -input PersonSort { - name: SortDirection -} - -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - -"Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." -input PersonTwoSort { - name: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - typename_IN: [PersonImplementation!] -} - ----- - -=== Single relationship with nested operation CREATE specified - -.Schema -[source,graphql,schema=true] ----- -interface Person { - name: String -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonTwo implements Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -interface Person { - name: String -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo implements Person { - name: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -enum PersonImplementation { - PersonOne - PersonTwo -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - -"Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int -} - -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort] -} - -"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." -input PersonSort { - name: SortDirection -} - -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - -"Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." -input PersonTwoSort { - name: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - typename_IN: [PersonImplementation!] -} - ----- - -=== Single relationship with nested operation CONNECT specified - -.Schema -[source,graphql,schema=true] ----- -interface Person { - name: String -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonTwo implements Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -interface Person { - name: String -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo implements Person { - name: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -enum PersonImplementation { - PersonOne - PersonTwo -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - -"Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int -} - -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort] -} - -"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." -input PersonSort { - name: SortDirection -} - -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - -"Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." -input PersonTwoSort { - name: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - typename_IN: [PersonImplementation!] -} - ----- - -=== Single relationship with nested operation UPDATE specified - -.Schema -[source,graphql,schema=true] ----- -interface Person { - name: String -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonTwo implements Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [UPDATE]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -interface Person { - name: String -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo implements Person { - name: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -enum PersonImplementation { - PersonOne - PersonTwo -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - -"Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int -} - -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort] -} - -"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." -input PersonSort { - name: SortDirection -} - -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - -"Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." -input PersonTwoSort { - name: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - typename_IN: [PersonImplementation!] -} - ----- - -=== Single relationship with nested operation DELETE specified - -.Schema -[source,graphql,schema=true] ----- -interface Person { - name: String -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonTwo implements Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DELETE]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -interface Person { - name: String -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo implements Person { - name: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -enum PersonImplementation { - PersonOne - PersonTwo -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - -"Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int -} - -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort] -} - -"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." -input PersonSort { - name: SortDirection -} - -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - -"Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." -input PersonTwoSort { - name: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - typename_IN: [PersonImplementation!] -} - ----- - -=== Single relationship with nested operation DISCONNECT specified - -.Schema -[source,graphql,schema=true] ----- -interface Person { - name: String -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonTwo implements Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DISCONNECT]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -interface Person { - name: String -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo implements Person { - name: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -enum PersonImplementation { - PersonOne - PersonTwo -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - -"Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int -} - -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort] -} - -"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." -input PersonSort { - name: SortDirection -} - -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - -"Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." -input PersonTwoSort { - name: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - typename_IN: [PersonImplementation!] -} - ----- - -=== Two relationships with nested operations specified on one - -.Schema -[source,graphql,schema=true] ----- -interface Person { - name: String -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonTwo implements Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) - producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -interface Person { - name: String -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID - producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieProducersConnection { - edges: [MovieProducersRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieProducersRelationship { - cursor: String! - node: Person! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo implements Person { - name: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -enum PersonImplementation { - PersonOne - PersonTwo -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -input MovieProducersConnectionSort { - node: PersonSort -} - -input MovieProducersConnectionWhere { - AND: [MovieProducersConnectionWhere!] - NOT: MovieProducersConnectionWhere - OR: [MovieProducersConnectionWhere!] - node: PersonWhere -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - "Return Movies where all of the related MovieProducersConnections match this filter" - producersConnection_ALL: MovieProducersConnectionWhere - "Return Movies where none of the related MovieProducersConnections match this filter" - producersConnection_NONE: MovieProducersConnectionWhere - "Return Movies where one of the related MovieProducersConnections match this filter" - producersConnection_SINGLE: MovieProducersConnectionWhere - "Return Movies where some of the related MovieProducersConnections match this filter" - producersConnection_SOME: MovieProducersConnectionWhere - "Return Movies where all of the related People match this filter" - producers_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - producers_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - producers_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - producers_SOME: PersonWhere -} - -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - -"Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int -} - -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort] -} - -"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." -input PersonSort { - name: SortDirection -} - -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - -"Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." -input PersonTwoSort { - name: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - typename_IN: [PersonImplementation!] -} - ----- - -=== Two relationships with nested operations specified on both - -.Schema -[source,graphql,schema=true] ----- -interface Person { - name: String -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonTwo implements Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE, DELETE]) - producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -interface Person { - name: String -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID - producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieProducersConnection { - edges: [MovieProducersRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieProducersRelationship { - cursor: String! - node: Person! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo implements Person { - name: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -enum PersonImplementation { - PersonOne - PersonTwo -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -input MovieProducersConnectionSort { - node: PersonSort -} - -input MovieProducersConnectionWhere { - AND: [MovieProducersConnectionWhere!] - NOT: MovieProducersConnectionWhere - OR: [MovieProducersConnectionWhere!] - node: PersonWhere -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - "Return Movies where all of the related MovieProducersConnections match this filter" - producersConnection_ALL: MovieProducersConnectionWhere - "Return Movies where none of the related MovieProducersConnections match this filter" - producersConnection_NONE: MovieProducersConnectionWhere - "Return Movies where one of the related MovieProducersConnections match this filter" - producersConnection_SINGLE: MovieProducersConnectionWhere - "Return Movies where some of the related MovieProducersConnections match this filter" - producersConnection_SOME: MovieProducersConnectionWhere - "Return Movies where all of the related People match this filter" - producers_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - producers_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - producers_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - producers_SOME: PersonWhere -} - -input PersonOneOptions { - limit: Int - offset: Int - "Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonOneSort!] -} - -"Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object." -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int -} - -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort] -} - -"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." -input PersonSort { - name: SortDirection -} - -input PersonTwoOptions { - limit: Int - offset: Int - "Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonTwoSort!] -} - -"Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object." -input PersonTwoSort { - name: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - typename_IN: [PersonImplementation!] -} - ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/relationship-nested-operations.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/relationship-nested-operations.js.adoc deleted file mode 100644 index 0589c83f..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/directives/relationship-nested-operations.js.adoc +++ /dev/null @@ -1,6445 +0,0 @@ -// This file was generated by the Test-Case extractor of neo4j-graphql -:toc: -:toclevels: 42 - -= Relationship nested operations - -== Related to a concrete type - -=== Should not generate UpdateFieldInput input with no nested operations - -.Schema -[source,graphql,schema=true] ----- -type Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: []) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort!] -} - -""" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -""" -input PersonSort { - name: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== Single relationship with nested operation CREATE specified - -.Schema -[source,graphql,schema=true] ----- -type Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort!] -} - -""" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -""" -input PersonSort { - name: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== Single relationship with nested operation CONNECT specified - -.Schema -[source,graphql,schema=true] ----- -type Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort!] -} - -""" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -""" -input PersonSort { - name: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== Single relationship with nested operation UPDATE specified - -.Schema -[source,graphql,schema=true] ----- -type Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [UPDATE]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort!] -} - -""" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -""" -input PersonSort { - name: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== Single relationship with nested operation DELETE specified - -.Schema -[source,graphql,schema=true] ----- -type Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DELETE]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort!] -} - -""" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -""" -input PersonSort { - name: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== Single relationship with nested operation DISCONNECT specified - -.Schema -[source,graphql,schema=true] ----- -type Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DISCONNECT]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort!] -} - -""" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -""" -input PersonSort { - name: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== Should not generate any nested operations if only CONNECT_OR_CREATE is specified and the related type does not have a unique field - -.Schema -[source,graphql,schema=true] ----- -type Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT_OR_CREATE]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort!] -} - -""" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -""" -input PersonSort { - name: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== Two relationships with nested operations specified on one - -.Schema -[source,graphql,schema=true] ----- -type Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) - producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID - producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -type MovieProducersConnection { - edges: [MovieProducersRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieProducersConnectionSort { - node: PersonSort -} - -input MovieProducersConnectionWhere { - AND: [MovieProducersConnectionWhere!] - NOT: MovieProducersConnectionWhere - OR: [MovieProducersConnectionWhere!] - node: PersonWhere -} - -type MovieProducersRelationship { - cursor: String! - node: Person! -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - """ - Return Movies where all of the related MovieProducersConnections match this filter - """ - producersConnection_ALL: MovieProducersConnectionWhere - """ - Return Movies where none of the related MovieProducersConnections match this filter - """ - producersConnection_NONE: MovieProducersConnectionWhere - """ - Return Movies where one of the related MovieProducersConnections match this filter - """ - producersConnection_SINGLE: MovieProducersConnectionWhere - """ - Return Movies where some of the related MovieProducersConnections match this filter - """ - producersConnection_SOME: MovieProducersConnectionWhere - """Return Movies where all of the related People match this filter""" - producers_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - producers_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - producers_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - producers_SOME: PersonWhere -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort!] -} - -""" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -""" -input PersonSort { - name: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== Two relationships with nested operations specified on both - -.Schema -[source,graphql,schema=true] ----- -type Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) - producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID - producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -type MovieProducersConnection { - edges: [MovieProducersRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieProducersConnectionSort { - node: PersonSort -} - -input MovieProducersConnectionWhere { - AND: [MovieProducersConnectionWhere!] - NOT: MovieProducersConnectionWhere - OR: [MovieProducersConnectionWhere!] - node: PersonWhere -} - -type MovieProducersRelationship { - cursor: String! - node: Person! -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - """ - Return Movies where all of the related MovieProducersConnections match this filter - """ - producersConnection_ALL: MovieProducersConnectionWhere - """ - Return Movies where none of the related MovieProducersConnections match this filter - """ - producersConnection_NONE: MovieProducersConnectionWhere - """ - Return Movies where one of the related MovieProducersConnections match this filter - """ - producersConnection_SINGLE: MovieProducersConnectionWhere - """ - Return Movies where some of the related MovieProducersConnections match this filter - """ - producersConnection_SOME: MovieProducersConnectionWhere - """Return Movies where all of the related People match this filter""" - producers_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - producers_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - producers_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - producers_SOME: PersonWhere -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort!] -} - -""" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -""" -input PersonSort { - name: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -== Related to a union type - -=== Should not generate UpdateFieldInput input with no nested operations - -.Schema -[source,graphql,schema=true] ----- -type PersonOne { - name: String -} - -type PersonTwo { - nameTwo: String -} - -union Person = PersonOne | PersonTwo - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: []) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Person = PersonOne | PersonTwo - -type PersonOne { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - -""" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -""" -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - -""" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -""" -input PersonTwoSort { - nameTwo: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== Single relationship with nested operation CREATE specified - -.Schema -[source,graphql,schema=true] ----- -type PersonOne { - name: String -} - -type PersonTwo { - nameTwo: String -} - -union Person = PersonOne | PersonTwo - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Person = PersonOne | PersonTwo - -type PersonOne { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - -""" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -""" -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - -""" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -""" -input PersonTwoSort { - nameTwo: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== Single relationship with nested operation CONNECT specified - -.Schema -[source,graphql,schema=true] ----- -type PersonOne { - name: String -} - -type PersonTwo { - nameTwo: String -} - -union Person = PersonOne | PersonTwo - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Person = PersonOne | PersonTwo - -type PersonOne { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - -""" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -""" -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - -""" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -""" -input PersonTwoSort { - nameTwo: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== Single relationship with nested operation UPDATE specified - -.Schema -[source,graphql,schema=true] ----- -type PersonOne { - name: String -} - -type PersonTwo { - nameTwo: String -} - -union Person = PersonOne | PersonTwo - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [UPDATE]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Person = PersonOne | PersonTwo - -type PersonOne { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - -""" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -""" -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - -""" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -""" -input PersonTwoSort { - nameTwo: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== Single relationship with nested operation DELETE specified - -.Schema -[source,graphql,schema=true] ----- -type PersonOne { - name: String -} - -type PersonTwo { - nameTwo: String -} - -union Person = PersonOne | PersonTwo - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DELETE]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Person = PersonOne | PersonTwo - -type PersonOne { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - -""" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -""" -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - -""" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -""" -input PersonTwoSort { - nameTwo: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== Single relationship with nested operation DISCONNECT specified - -.Schema -[source,graphql,schema=true] ----- -type PersonOne { - name: String -} - -type PersonTwo { - nameTwo: String -} - -union Person = PersonOne | PersonTwo - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DISCONNECT]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Person = PersonOne | PersonTwo - -type PersonOne { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - -""" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -""" -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - -""" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -""" -input PersonTwoSort { - nameTwo: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== Should not generate any nested operations if only CONNECT_OR_CREATE is specified and the related type does not have a unique field - -.Schema -[source,graphql,schema=true] ----- -type PersonOne { - name: String -} - -type PersonTwo { - nameTwo: String -} - -union Person = PersonOne | PersonTwo - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT_OR_CREATE]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Person = PersonOne | PersonTwo - -type PersonOne { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - -""" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -""" -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - -""" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -""" -input PersonTwoSort { - nameTwo: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== Two relationships with nested operations specified on one - -.Schema -[source,graphql,schema=true] ----- -type PersonOne { - name: String -} - -type PersonTwo { - nameTwo: String -} - -union Person = PersonOne | PersonTwo - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) - producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID - producers(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, where: MovieProducersConnectionWhere): MovieProducersConnection! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -type MovieProducersConnection { - edges: [MovieProducersRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieProducersConnectionWhere { - PersonOne: MovieProducersPersonOneConnectionWhere - PersonTwo: MovieProducersPersonTwoConnectionWhere -} - -input MovieProducersPersonOneConnectionWhere { - AND: [MovieProducersPersonOneConnectionWhere!] - NOT: MovieProducersPersonOneConnectionWhere - OR: [MovieProducersPersonOneConnectionWhere!] - node: PersonOneWhere -} - -input MovieProducersPersonTwoConnectionWhere { - AND: [MovieProducersPersonTwoConnectionWhere!] - NOT: MovieProducersPersonTwoConnectionWhere - OR: [MovieProducersPersonTwoConnectionWhere!] - node: PersonTwoWhere -} - -type MovieProducersRelationship { - cursor: String! - node: Person! -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - """ - Return Movies where all of the related MovieProducersConnections match this filter - """ - producersConnection_ALL: MovieProducersConnectionWhere - """ - Return Movies where none of the related MovieProducersConnections match this filter - """ - producersConnection_NONE: MovieProducersConnectionWhere - """ - Return Movies where one of the related MovieProducersConnections match this filter - """ - producersConnection_SINGLE: MovieProducersConnectionWhere - """ - Return Movies where some of the related MovieProducersConnections match this filter - """ - producersConnection_SOME: MovieProducersConnectionWhere - """Return Movies where all of the related People match this filter""" - producers_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - producers_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - producers_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - producers_SOME: PersonWhere -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Person = PersonOne | PersonTwo - -type PersonOne { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - -""" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -""" -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - -""" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -""" -input PersonTwoSort { - nameTwo: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== Two relationships with nested operations specified on both - -.Schema -[source,graphql,schema=true] ----- -type PersonOne { - name: String -} - -type PersonTwo { - nameTwo: String -} - -union Person = PersonOne | PersonTwo - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) - producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID - producers(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, where: MovieProducersConnectionWhere): MovieProducersConnection! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -type MovieProducersConnection { - edges: [MovieProducersRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieProducersConnectionWhere { - PersonOne: MovieProducersPersonOneConnectionWhere - PersonTwo: MovieProducersPersonTwoConnectionWhere -} - -input MovieProducersPersonOneConnectionWhere { - AND: [MovieProducersPersonOneConnectionWhere!] - NOT: MovieProducersPersonOneConnectionWhere - OR: [MovieProducersPersonOneConnectionWhere!] - node: PersonOneWhere -} - -input MovieProducersPersonTwoConnectionWhere { - AND: [MovieProducersPersonTwoConnectionWhere!] - NOT: MovieProducersPersonTwoConnectionWhere - OR: [MovieProducersPersonTwoConnectionWhere!] - node: PersonTwoWhere -} - -type MovieProducersRelationship { - cursor: String! - node: Person! -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - """ - Return Movies where all of the related MovieProducersConnections match this filter - """ - producersConnection_ALL: MovieProducersConnectionWhere - """ - Return Movies where none of the related MovieProducersConnections match this filter - """ - producersConnection_NONE: MovieProducersConnectionWhere - """ - Return Movies where one of the related MovieProducersConnections match this filter - """ - producersConnection_SINGLE: MovieProducersConnectionWhere - """ - Return Movies where some of the related MovieProducersConnections match this filter - """ - producersConnection_SOME: MovieProducersConnectionWhere - """Return Movies where all of the related People match this filter""" - producers_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - producers_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - producers_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - producers_SOME: PersonWhere -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Person = PersonOne | PersonTwo - -type PersonOne { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - -""" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -""" -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - -""" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -""" -input PersonTwoSort { - nameTwo: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: QueryOptions, where: PersonWhere): [Person!]! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -== Related to an interface type - -=== Should not generate UpdateFieldInput input with no nested operations - -.Schema -[source,graphql,schema=true] ----- -interface Person { - name: String -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonTwo implements Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: []) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -interface Person { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -enum PersonImplementation { - PersonOne - PersonTwo -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - -""" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -""" -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort] -} - -""" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -""" -input PersonSort { - name: SortDirection -} - -type PersonTwo implements Person { - name: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - -""" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -""" -input PersonTwoSort { - name: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - typename_IN: [PersonImplementation!] -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== Single relationship with nested operation CREATE specified - -.Schema -[source,graphql,schema=true] ----- -interface Person { - name: String -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonTwo implements Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -interface Person { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -enum PersonImplementation { - PersonOne - PersonTwo -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - -""" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -""" -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort] -} - -""" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -""" -input PersonSort { - name: SortDirection -} - -type PersonTwo implements Person { - name: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - -""" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -""" -input PersonTwoSort { - name: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - typename_IN: [PersonImplementation!] -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== Single relationship with nested operation CONNECT specified - -.Schema -[source,graphql,schema=true] ----- -interface Person { - name: String -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonTwo implements Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -interface Person { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -enum PersonImplementation { - PersonOne - PersonTwo -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - -""" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -""" -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort] -} - -""" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -""" -input PersonSort { - name: SortDirection -} - -type PersonTwo implements Person { - name: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - -""" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -""" -input PersonTwoSort { - name: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - typename_IN: [PersonImplementation!] -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== Single relationship with nested operation UPDATE specified - -.Schema -[source,graphql,schema=true] ----- -interface Person { - name: String -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonTwo implements Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [UPDATE]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -interface Person { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -enum PersonImplementation { - PersonOne - PersonTwo -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - -""" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -""" -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort] -} - -""" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -""" -input PersonSort { - name: SortDirection -} - -type PersonTwo implements Person { - name: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - -""" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -""" -input PersonTwoSort { - name: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - typename_IN: [PersonImplementation!] -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== Single relationship with nested operation DELETE specified - -.Schema -[source,graphql,schema=true] ----- -interface Person { - name: String -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonTwo implements Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DELETE]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -interface Person { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -enum PersonImplementation { - PersonOne - PersonTwo -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - -""" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -""" -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort] -} - -""" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -""" -input PersonSort { - name: SortDirection -} - -type PersonTwo implements Person { - name: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - -""" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -""" -input PersonTwoSort { - name: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - typename_IN: [PersonImplementation!] -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== Single relationship with nested operation DISCONNECT specified - -.Schema -[source,graphql,schema=true] ----- -interface Person { - name: String -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonTwo implements Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DISCONNECT]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -interface Person { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -enum PersonImplementation { - PersonOne - PersonTwo -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - -""" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -""" -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort] -} - -""" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -""" -input PersonSort { - name: SortDirection -} - -type PersonTwo implements Person { - name: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - -""" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -""" -input PersonTwoSort { - name: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - typename_IN: [PersonImplementation!] -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== Two relationships with nested operations specified on one - -.Schema -[source,graphql,schema=true] ----- -interface Person { - name: String -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonTwo implements Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) - producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID - producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -type MovieProducersConnection { - edges: [MovieProducersRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieProducersConnectionSort { - node: PersonSort -} - -input MovieProducersConnectionWhere { - AND: [MovieProducersConnectionWhere!] - NOT: MovieProducersConnectionWhere - OR: [MovieProducersConnectionWhere!] - node: PersonWhere -} - -type MovieProducersRelationship { - cursor: String! - node: Person! -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - """ - Return Movies where all of the related MovieProducersConnections match this filter - """ - producersConnection_ALL: MovieProducersConnectionWhere - """ - Return Movies where none of the related MovieProducersConnections match this filter - """ - producersConnection_NONE: MovieProducersConnectionWhere - """ - Return Movies where one of the related MovieProducersConnections match this filter - """ - producersConnection_SINGLE: MovieProducersConnectionWhere - """ - Return Movies where some of the related MovieProducersConnections match this filter - """ - producersConnection_SOME: MovieProducersConnectionWhere - """Return Movies where all of the related People match this filter""" - producers_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - producers_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - producers_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - producers_SOME: PersonWhere -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -interface Person { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -enum PersonImplementation { - PersonOne - PersonTwo -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - -""" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -""" -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort] -} - -""" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -""" -input PersonSort { - name: SortDirection -} - -type PersonTwo implements Person { - name: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - -""" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -""" -input PersonTwoSort { - name: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - typename_IN: [PersonImplementation!] -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -=== Two relationships with nested operations specified on both - -.Schema -[source,graphql,schema=true] ----- -interface Person { - name: String -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonTwo implements Person { - name: String -} - -type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE, DELETE]) - producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID - producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -type MovieProducersConnection { - edges: [MovieProducersRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieProducersConnectionSort { - node: PersonSort -} - -input MovieProducersConnectionWhere { - AND: [MovieProducersConnectionWhere!] - NOT: MovieProducersConnectionWhere - OR: [MovieProducersConnectionWhere!] - node: PersonWhere -} - -type MovieProducersRelationship { - cursor: String! - node: Person! -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - """ - Return Movies where all of the related MovieProducersConnections match this filter - """ - producersConnection_ALL: MovieProducersConnectionWhere - """ - Return Movies where none of the related MovieProducersConnections match this filter - """ - producersConnection_NONE: MovieProducersConnectionWhere - """ - Return Movies where one of the related MovieProducersConnections match this filter - """ - producersConnection_SINGLE: MovieProducersConnectionWhere - """ - Return Movies where some of the related MovieProducersConnections match this filter - """ - producersConnection_SOME: MovieProducersConnectionWhere - """Return Movies where all of the related People match this filter""" - producers_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - producers_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - producers_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - producers_SOME: PersonWhere -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -interface Person { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -enum PersonImplementation { - PersonOne - PersonTwo -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - """ - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonOneSort!] -} - -""" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -""" -input PersonOneSort { - name: SortDirection -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort] -} - -""" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -""" -input PersonSort { - name: SortDirection -} - -type PersonTwo implements Person { - name: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - """ - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonTwoSort!] -} - -""" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -""" -input PersonTwoSort { - name: SortDirection -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - typename_IN: [PersonImplementation!] -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/interface-relationships.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/interface-relationships.adoc deleted file mode 100644 index 0e16b389..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/interface-relationships.adoc +++ /dev/null @@ -1,310 +0,0 @@ -:toc: -:toclevels: 42 - -= Interface Relationships - -== Interface Relationships - single - -.Schema -[source,graphql,schema=true] ----- -interface Production { - title: String! -} - -type Movie implements Production { - title: String! - runtime: Int! -} - -type Series implements Production { - title: String! - episodes: Int! -} - -type ActedIn @relationshipProperties { - screenTime: Int! -} - -type Actor { - name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -interface Production { - title: String! -} - -""" -The edge properties for the following fields: -* Actor.actedIn -""" -type ActedIn { - screenTime: Int! -} - -type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type ActorActedInRelationship { - cursor: String! - node: Production! - properties: ActedIn! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie implements Production { - runtime: Int! - title: String! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type ProductionEdge { - cursor: String! - node: Production! -} - -type ProductionsConnection { - edges: [ProductionEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements Production { - episodes: Int! - title: String! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -enum ProductionImplementation { - Movie - Series -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input ActedInSort { - screenTime: SortDirection -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int -} - -input ActorActedInConnectionSort { - edge: ActedInSort - node: ProductionSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - node: ProductionWhere -} - -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - -"Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." -input ActorSort { - name: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - "Return Actors where all of the related ActorActedInConnections match this filter" - actedInConnection_ALL: ActorActedInConnectionWhere - "Return Actors where none of the related ActorActedInConnections match this filter" - actedInConnection_NONE: ActorActedInConnectionWhere - "Return Actors where one of the related ActorActedInConnections match this filter" - actedInConnection_SINGLE: ActorActedInConnectionWhere - "Return Actors where some of the related ActorActedInConnections match this filter" - actedInConnection_SOME: ActorActedInConnectionWhere - "Return Actors where all of the related Productions match this filter" - actedIn_ALL: ProductionWhere - "Return Actors where none of the related Productions match this filter" - actedIn_NONE: ProductionWhere - "Return Actors where one of the related Productions match this filter" - actedIn_SINGLE: ProductionWhere - "Return Actors where some of the related Productions match this filter" - actedIn_SOME: ProductionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_STARTS_WITH: String -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - runtime: SortDirection - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - -input ProductionOptions { - limit: Int - offset: Int - "Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ProductionSort] -} - -"Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object." -input ProductionSort { - title: SortDirection -} - -input ProductionWhere { - AND: [ProductionWhere!] - NOT: ProductionWhere - OR: [ProductionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] -} - -input SeriesOptions { - limit: Int - offset: Int - "Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array." - sort: [SeriesSort!] -} - -"Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object." -input SeriesSort { - episodes: SortDirection - title: SortDirection -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - episodes: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/interface-relationships.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/interface-relationships.js.adoc deleted file mode 100644 index 2b07f1d3..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/interface-relationships.js.adoc +++ /dev/null @@ -1,334 +0,0 @@ -// This file was generated by the Test-Case extractor of neo4j-graphql -:toc: -:toclevels: 42 - -= Interface Relationships - -== Interface Relationships - single - -.Schema -[source,graphql,schema=true] ----- -interface Production { - title: String! -} - -type Movie implements Production { - title: String! - runtime: Int! -} - -type Series implements Production { - title: String! - episodes: Int! -} - -type ActedIn @relationshipProperties { - screenTime: Int! -} - -type Actor { - name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -""" -The edge properties for the following fields: -* Actor.actedIn -""" -type ActedIn { - screenTime: Int! -} - -input ActedInSort { - screenTime: SortDirection -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int -} - -type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionSort { - edge: ActedInSort - node: ProductionSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - node: ProductionWhere -} - -type ActorActedInRelationship { - cursor: String! - node: Production! - properties: ActedIn! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - -""" -Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. -""" -input ActorSort { - name: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - """ - Return Actors where all of the related ActorActedInConnections match this filter - """ - actedInConnection_ALL: ActorActedInConnectionWhere - """ - Return Actors where none of the related ActorActedInConnections match this filter - """ - actedInConnection_NONE: ActorActedInConnectionWhere - """ - Return Actors where one of the related ActorActedInConnections match this filter - """ - actedInConnection_SINGLE: ActorActedInConnectionWhere - """ - Return Actors where some of the related ActorActedInConnections match this filter - """ - actedInConnection_SOME: ActorActedInConnectionWhere - """Return Actors where all of the related Productions match this filter""" - actedIn_ALL: ProductionWhere - """Return Actors where none of the related Productions match this filter""" - actedIn_NONE: ProductionWhere - """Return Actors where one of the related Productions match this filter""" - actedIn_SINGLE: ProductionWhere - """Return Actors where some of the related Productions match this filter""" - actedIn_SOME: ProductionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie implements Production { - runtime: Int! - title: String! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - runtime: SortDirection - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Production { - title: String! -} - -type ProductionEdge { - cursor: String! - node: Production! -} - -enum ProductionImplementation { - Movie - Series -} - -input ProductionOptions { - limit: Int - offset: Int - """ - Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ProductionSort] -} - -""" -Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. -""" -input ProductionSort { - title: SortDirection -} - -input ProductionWhere { - AND: [ProductionWhere!] - NOT: ProductionWhere - OR: [ProductionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] -} - -type ProductionsConnection { - edges: [ProductionEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements Production { - episodes: Int! - title: String! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -input SeriesOptions { - limit: Int - offset: Int - """ - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [SeriesSort!] -} - -""" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -""" -input SeriesSort { - episodes: SortDirection - title: SortDirection -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - episodes: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/interfaces/aggregations.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/interfaces/aggregations.adoc deleted file mode 100644 index a6ee52ed..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/interfaces/aggregations.adoc +++ /dev/null @@ -1,491 +0,0 @@ -:toc: -:toclevels: 42 - -= Interface Top Level Aggregations - -== Interfaces - -.Schema -[source,graphql,schema=true] ----- -interface Production { - title: String! - cost: Float! -} - -type Movie implements Production { - title: String! - cost: Float! - runtime: Int! -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -interface Production { - cost: Float! - title: String! -} - -type Movie implements Production { - cost: Float! - runtime: Int! - title: String! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type ProductionEdge { - cursor: String! - node: Production! -} - -type ProductionsConnection { - edges: [ProductionEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! -} - -enum ProductionImplementation { - Movie -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - cost: SortDirection - runtime: SortDirection - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - cost: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - -input ProductionOptions { - limit: Int - offset: Int - "Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ProductionSort] -} - -"Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object." -input ProductionSort { - cost: SortDirection - title: SortDirection -} - -input ProductionWhere { - AND: [ProductionWhere!] - NOT: ProductionWhere - OR: [ProductionWhere!] - cost: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] -} - ----- - -== Interfaces With Relationships - -.Schema -[source,graphql,schema=true] ----- -interface Production { - title: String! - cost: Float! -} - -type Movie implements Production { - title: String! - cost: Float! - runtime: Int! -} - -type Series implements Production { - title: String! - cost: Float! - episodes: Int! -} - -type ActedIn @relationshipProperties { - screenTime: Int! -} - -type Actor { - name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -interface Production { - cost: Float! - title: String! -} - -""" -The edge properties for the following fields: -* Actor.actedIn -""" -type ActedIn { - screenTime: Int! -} - -type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type ActorActedInRelationship { - cursor: String! - node: Production! - properties: ActedIn! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie implements Production { - cost: Float! - runtime: Int! - title: String! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type ProductionEdge { - cursor: String! - node: Production! -} - -type ProductionsConnection { - edges: [ProductionEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements Production { - cost: Float! - episodes: Int! - title: String! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -enum ProductionImplementation { - Movie - Series -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input ActedInSort { - screenTime: SortDirection -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int -} - -input ActorActedInConnectionSort { - edge: ActedInSort - node: ProductionSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - node: ProductionWhere -} - -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - -"Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." -input ActorSort { - name: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - "Return Actors where all of the related ActorActedInConnections match this filter" - actedInConnection_ALL: ActorActedInConnectionWhere - "Return Actors where none of the related ActorActedInConnections match this filter" - actedInConnection_NONE: ActorActedInConnectionWhere - "Return Actors where one of the related ActorActedInConnections match this filter" - actedInConnection_SINGLE: ActorActedInConnectionWhere - "Return Actors where some of the related ActorActedInConnections match this filter" - actedInConnection_SOME: ActorActedInConnectionWhere - "Return Actors where all of the related Productions match this filter" - actedIn_ALL: ProductionWhere - "Return Actors where none of the related Productions match this filter" - actedIn_NONE: ProductionWhere - "Return Actors where one of the related Productions match this filter" - actedIn_SINGLE: ProductionWhere - "Return Actors where some of the related Productions match this filter" - actedIn_SOME: ProductionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_STARTS_WITH: String -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - cost: SortDirection - runtime: SortDirection - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - cost: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - -input ProductionOptions { - limit: Int - offset: Int - "Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ProductionSort] -} - -"Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object." -input ProductionSort { - cost: SortDirection - title: SortDirection -} - -input ProductionWhere { - AND: [ProductionWhere!] - NOT: ProductionWhere - OR: [ProductionWhere!] - cost: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] -} - -input SeriesOptions { - limit: Int - offset: Int - "Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array." - sort: [SeriesSort!] -} - -"Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object." -input SeriesSort { - cost: SortDirection - episodes: SortDirection - title: SortDirection -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - cost: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - episodes: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/interfaces/aggregations.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/interfaces/aggregations.js.adoc deleted file mode 100644 index 58656e43..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/interfaces/aggregations.js.adoc +++ /dev/null @@ -1,522 +0,0 @@ -// This file was generated by the Test-Case extractor of neo4j-graphql -:toc: -:toclevels: 42 - -= Interface Top Level Aggregations - -== Interfaces - -.Schema -[source,graphql,schema=true] ----- -interface Production { - title: String! - cost: Float! -} - -type Movie implements Production { - title: String! - cost: Float! - runtime: Int! -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie implements Production { - cost: Float! - runtime: Int! - title: String! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - cost: SortDirection - runtime: SortDirection - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - cost: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Production { - cost: Float! - title: String! -} - -type ProductionEdge { - cursor: String! - node: Production! -} - -enum ProductionImplementation { - Movie -} - -input ProductionOptions { - limit: Int - offset: Int - """ - Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ProductionSort] -} - -""" -Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. -""" -input ProductionSort { - cost: SortDirection - title: SortDirection -} - -input ProductionWhere { - AND: [ProductionWhere!] - NOT: ProductionWhere - OR: [ProductionWhere!] - cost: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] -} - -type ProductionsConnection { - edges: [ProductionEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -== Interfaces With Relationships - -.Schema -[source,graphql,schema=true] ----- -interface Production { - title: String! - cost: Float! -} - -type Movie implements Production { - title: String! - cost: Float! - runtime: Int! -} - -type Series implements Production { - title: String! - cost: Float! - episodes: Int! -} - -type ActedIn @relationshipProperties { - screenTime: Int! -} - -type Actor { - name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -""" -The edge properties for the following fields: -* Actor.actedIn -""" -type ActedIn { - screenTime: Int! -} - -input ActedInSort { - screenTime: SortDirection -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int -} - -type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionSort { - edge: ActedInSort - node: ProductionSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - node: ProductionWhere -} - -type ActorActedInRelationship { - cursor: String! - node: Production! - properties: ActedIn! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - -""" -Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. -""" -input ActorSort { - name: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - """ - Return Actors where all of the related ActorActedInConnections match this filter - """ - actedInConnection_ALL: ActorActedInConnectionWhere - """ - Return Actors where none of the related ActorActedInConnections match this filter - """ - actedInConnection_NONE: ActorActedInConnectionWhere - """ - Return Actors where one of the related ActorActedInConnections match this filter - """ - actedInConnection_SINGLE: ActorActedInConnectionWhere - """ - Return Actors where some of the related ActorActedInConnections match this filter - """ - actedInConnection_SOME: ActorActedInConnectionWhere - """Return Actors where all of the related Productions match this filter""" - actedIn_ALL: ProductionWhere - """Return Actors where none of the related Productions match this filter""" - actedIn_NONE: ProductionWhere - """Return Actors where one of the related Productions match this filter""" - actedIn_SINGLE: ProductionWhere - """Return Actors where some of the related Productions match this filter""" - actedIn_SOME: ProductionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie implements Production { - cost: Float! - runtime: Int! - title: String! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - cost: SortDirection - runtime: SortDirection - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - cost: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Production { - cost: Float! - title: String! -} - -type ProductionEdge { - cursor: String! - node: Production! -} - -enum ProductionImplementation { - Movie - Series -} - -input ProductionOptions { - limit: Int - offset: Int - """ - Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ProductionSort] -} - -""" -Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. -""" -input ProductionSort { - cost: SortDirection - title: SortDirection -} - -input ProductionWhere { - AND: [ProductionWhere!] - NOT: ProductionWhere - OR: [ProductionWhere!] - cost: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] -} - -type ProductionsConnection { - edges: [ProductionEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements Production { - cost: Float! - episodes: Int! - title: String! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -input SeriesOptions { - limit: Int - offset: Int - """ - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [SeriesSort!] -} - -""" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -""" -input SeriesSort { - cost: SortDirection - episodes: SortDirection - title: SortDirection -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - cost: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - episodes: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/interfaces/typename-in.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/interfaces/typename-in.adoc deleted file mode 100644 index 1be8e757..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/interfaces/typename-in.adoc +++ /dev/null @@ -1,306 +0,0 @@ -:toc: -:toclevels: 42 - -= typename_IN - -== typename_IN - -.Schema -[source,graphql,schema=true] ----- -interface Production { - title: String! - cost: Float! -} - -type Movie implements Production { - title: String! - cost: Float! - runtime: Int! -} - -type Series implements Production { - title: String! - cost: Float! - episodes: Int! -} - -type Actor { - name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -interface Production { - cost: Float! - title: String! -} - -type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type ActorActedInRelationship { - cursor: String! - node: Production! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie implements Production { - cost: Float! - runtime: Int! - title: String! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type ProductionEdge { - cursor: String! - node: Production! -} - -type ProductionsConnection { - edges: [ProductionEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements Production { - cost: Float! - episodes: Int! - title: String! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -enum ProductionImplementation { - Movie - Series -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input ActorActedInConnectionSort { - node: ProductionSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - node: ProductionWhere -} - -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - -"Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." -input ActorSort { - name: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - "Return Actors where all of the related ActorActedInConnections match this filter" - actedInConnection_ALL: ActorActedInConnectionWhere - "Return Actors where none of the related ActorActedInConnections match this filter" - actedInConnection_NONE: ActorActedInConnectionWhere - "Return Actors where one of the related ActorActedInConnections match this filter" - actedInConnection_SINGLE: ActorActedInConnectionWhere - "Return Actors where some of the related ActorActedInConnections match this filter" - actedInConnection_SOME: ActorActedInConnectionWhere - "Return Actors where all of the related Productions match this filter" - actedIn_ALL: ProductionWhere - "Return Actors where none of the related Productions match this filter" - actedIn_NONE: ProductionWhere - "Return Actors where one of the related Productions match this filter" - actedIn_SINGLE: ProductionWhere - "Return Actors where some of the related Productions match this filter" - actedIn_SOME: ProductionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_STARTS_WITH: String -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - cost: SortDirection - runtime: SortDirection - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - cost: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - -input ProductionOptions { - limit: Int - offset: Int - "Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ProductionSort] -} - -"Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object." -input ProductionSort { - cost: SortDirection - title: SortDirection -} - -input ProductionWhere { - AND: [ProductionWhere!] - NOT: ProductionWhere - OR: [ProductionWhere!] - cost: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] -} - -input SeriesOptions { - limit: Int - offset: Int - "Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array." - sort: [SeriesSort!] -} - -"Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object." -input SeriesSort { - cost: SortDirection - episodes: SortDirection - title: SortDirection -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - cost: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - episodes: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/interfaces/typename-in.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/interfaces/typename-in.js.adoc deleted file mode 100644 index d7b20e6d..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/interfaces/typename-in.js.adoc +++ /dev/null @@ -1,330 +0,0 @@ -// This file was generated by the Test-Case extractor of neo4j-graphql -:toc: -:toclevels: 42 - -= typename_IN - -== typename_IN - -.Schema -[source,graphql,schema=true] ----- -interface Production { - title: String! - cost: Float! -} - -type Movie implements Production { - title: String! - cost: Float! - runtime: Int! -} - -type Series implements Production { - title: String! - cost: Float! - episodes: Int! -} - -type Actor { - name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionSort { - node: ProductionSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - node: ProductionWhere -} - -type ActorActedInRelationship { - cursor: String! - node: Production! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - -""" -Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. -""" -input ActorSort { - name: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - """ - Return Actors where all of the related ActorActedInConnections match this filter - """ - actedInConnection_ALL: ActorActedInConnectionWhere - """ - Return Actors where none of the related ActorActedInConnections match this filter - """ - actedInConnection_NONE: ActorActedInConnectionWhere - """ - Return Actors where one of the related ActorActedInConnections match this filter - """ - actedInConnection_SINGLE: ActorActedInConnectionWhere - """ - Return Actors where some of the related ActorActedInConnections match this filter - """ - actedInConnection_SOME: ActorActedInConnectionWhere - """Return Actors where all of the related Productions match this filter""" - actedIn_ALL: ProductionWhere - """Return Actors where none of the related Productions match this filter""" - actedIn_NONE: ProductionWhere - """Return Actors where one of the related Productions match this filter""" - actedIn_SINGLE: ProductionWhere - """Return Actors where some of the related Productions match this filter""" - actedIn_SOME: ProductionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie implements Production { - cost: Float! - runtime: Int! - title: String! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - cost: SortDirection - runtime: SortDirection - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - cost: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Production { - cost: Float! - title: String! -} - -type ProductionEdge { - cursor: String! - node: Production! -} - -enum ProductionImplementation { - Movie - Series -} - -input ProductionOptions { - limit: Int - offset: Int - """ - Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ProductionSort] -} - -""" -Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. -""" -input ProductionSort { - cost: SortDirection - title: SortDirection -} - -input ProductionWhere { - AND: [ProductionWhere!] - NOT: ProductionWhere - OR: [ProductionWhere!] - cost: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] -} - -type ProductionsConnection { - edges: [ProductionEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements Production { - cost: Float! - episodes: Int! - title: String! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -input SeriesOptions { - limit: Int - offset: Int - """ - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [SeriesSort!] -} - -""" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -""" -input SeriesSort { - cost: SortDirection - episodes: SortDirection - title: SortDirection -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - cost: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - episodes: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/math.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/math.adoc deleted file mode 100644 index 57f8a6ef..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/math.adoc +++ /dev/null @@ -1,976 +0,0 @@ -:toc: -:toclevels: 42 - -= Algebraic - -== Int fields should be extended with Increment/Decrement operators - -.Schema -[source,graphql,schema=true] ----- -type Movie { - id: ID - viewers: Int! -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - id: ID - viewers: Int! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection - viewers: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - viewers: Int - viewers_GT: Int - viewers_GTE: Int - viewers_IN: [Int!] - viewers_LT: Int - viewers_LTE: Int -} - ----- - -== BigInt fields should be extended with Increment/Decrement operators - -.Schema -[source,graphql,schema=true] ----- -type Movie { - id: ID - viewers: BigInt! -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - id: ID - viewers: BigInt! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -"A BigInt value up to 64 bits in size, which can be a number or a string if used inline, or a string only if used as a variable. Always returned as a string." -scalar BigInt - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection - viewers: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - viewers: BigInt - viewers_GT: BigInt - viewers_GTE: BigInt - viewers_IN: [BigInt!] - viewers_LT: BigInt - viewers_LTE: BigInt -} - ----- - -== Float fields should be extended with Add/Subtract/Multiply/Divide operators - -.Schema -[source,graphql,schema=true] ----- -type Movie { - id: ID - viewers: Float! -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - id: ID - viewers: Float! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection - viewers: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - viewers: Float - viewers_GT: Float - viewers_GTE: Float - viewers_IN: [Float!] - viewers_LT: Float - viewers_LTE: Float -} - ----- - -== Operators should be presents in nested updates - -.Schema -[source,graphql,schema=true] ----- -type Movie { - id: ID - viewers: Int! - directedBy: Director @relationship(type: "DIRECTS", direction: IN) -} - -type Director { - lastName: String! - directs: [Movie!]! @relationship(type: "DIRECTS", direction: OUT) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Director { - directs(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - directsConnection(after: String, directed: Boolean = true, first: Int, sort: [DirectorDirectsConnectionSort!], where: DirectorDirectsConnectionWhere): DirectorDirectsConnection! - lastName: String! -} - -type DirectorDirectsConnection { - edges: [DirectorDirectsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type DirectorDirectsRelationship { - cursor: String! - node: Movie! -} - -type DirectorEdge { - cursor: String! - node: Director! -} - -type DirectorsConnection { - edges: [DirectorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - directedBy(directed: Boolean = true, options: DirectorOptions, where: DirectorWhere): Director - directedByConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieDirectedByConnectionSort!], where: MovieDirectedByConnectionWhere): MovieDirectedByConnection! - id: ID - viewers: Int! -} - -type MovieDirectedByConnection { - edges: [MovieDirectedByRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieDirectedByRelationship { - cursor: String! - node: Director! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - directors(options: DirectorOptions, where: DirectorWhere): [Director!]! - directorsConnection(after: String, first: Int, sort: [DirectorSort], where: DirectorWhere): DirectorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input DirectorDirectsConnectionSort { - node: MovieSort -} - -input DirectorDirectsConnectionWhere { - AND: [DirectorDirectsConnectionWhere!] - NOT: DirectorDirectsConnectionWhere - OR: [DirectorDirectsConnectionWhere!] - node: MovieWhere -} - -input DirectorOptions { - limit: Int - offset: Int - "Specify one or more DirectorSort objects to sort Directors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [DirectorSort!] -} - -"Fields to sort Directors by. The order in which sorts are applied is not guaranteed when specifying many fields in one DirectorSort object." -input DirectorSort { - lastName: SortDirection -} - -input DirectorWhere { - AND: [DirectorWhere!] - NOT: DirectorWhere - OR: [DirectorWhere!] - "Return Directors where all of the related DirectorDirectsConnections match this filter" - directsConnection_ALL: DirectorDirectsConnectionWhere - "Return Directors where none of the related DirectorDirectsConnections match this filter" - directsConnection_NONE: DirectorDirectsConnectionWhere - "Return Directors where one of the related DirectorDirectsConnections match this filter" - directsConnection_SINGLE: DirectorDirectsConnectionWhere - "Return Directors where some of the related DirectorDirectsConnections match this filter" - directsConnection_SOME: DirectorDirectsConnectionWhere - "Return Directors where all of the related Movies match this filter" - directs_ALL: MovieWhere - "Return Directors where none of the related Movies match this filter" - directs_NONE: MovieWhere - "Return Directors where one of the related Movies match this filter" - directs_SINGLE: MovieWhere - "Return Directors where some of the related Movies match this filter" - directs_SOME: MovieWhere - lastName: String - lastName_CONTAINS: String - lastName_ENDS_WITH: String - lastName_IN: [String!] - lastName_STARTS_WITH: String -} - -input MovieDirectedByConnectionSort { - node: DirectorSort -} - -input MovieDirectedByConnectionWhere { - AND: [MovieDirectedByConnectionWhere!] - NOT: MovieDirectedByConnectionWhere - OR: [MovieDirectedByConnectionWhere!] - node: DirectorWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection - viewers: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - directedBy: DirectorWhere - directedByConnection: MovieDirectedByConnectionWhere - directedByConnection_NOT: MovieDirectedByConnectionWhere - directedBy_NOT: DirectorWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - viewers: Int - viewers_GT: Int - viewers_GTE: Int - viewers_IN: [Int!] - viewers_LT: Int - viewers_LTE: Int -} - ----- - -== Should be supported in interfaces - -.Schema -[source,graphql,schema=true] ----- -interface Production { - viewers: Int! -} - -type Movie implements Production { - id: ID - viewers: Int! - workers: [Person!]! @relationship(type: "WORKED_IN", direction: IN) -} - -type Person { - name: String! - worksInProduction: [Production!]! @relationship(type: "WORKED_IN", direction: OUT) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -interface Production { - viewers: Int! -} - -type Movie implements Production { - id: ID - viewers: Int! - workers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - workersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieWorkersConnectionSort!], where: MovieWorkersConnectionWhere): MovieWorkersConnection! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieWorkersConnection { - edges: [MovieWorkersRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieWorkersRelationship { - cursor: String! - node: Person! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String! - worksInProduction(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - worksInProductionConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonWorksInProductionConnectionSort!], where: PersonWorksInProductionConnectionWhere): PersonWorksInProductionConnection! -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type PersonWorksInProductionConnection { - edges: [PersonWorksInProductionRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonWorksInProductionRelationship { - cursor: String! - node: Production! -} - -type ProductionEdge { - cursor: String! - node: Production! -} - -type ProductionsConnection { - edges: [ProductionEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! -} - -enum ProductionImplementation { - Movie -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - id: SortDirection - viewers: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - viewers: Int - viewers_GT: Int - viewers_GTE: Int - viewers_IN: [Int!] - viewers_LT: Int - viewers_LTE: Int - "Return Movies where all of the related MovieWorkersConnections match this filter" - workersConnection_ALL: MovieWorkersConnectionWhere - "Return Movies where none of the related MovieWorkersConnections match this filter" - workersConnection_NONE: MovieWorkersConnectionWhere - "Return Movies where one of the related MovieWorkersConnections match this filter" - workersConnection_SINGLE: MovieWorkersConnectionWhere - "Return Movies where some of the related MovieWorkersConnections match this filter" - workersConnection_SOME: MovieWorkersConnectionWhere - "Return Movies where all of the related People match this filter" - workers_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - workers_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - workers_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - workers_SOME: PersonWhere -} - -input MovieWorkersConnectionSort { - node: PersonSort -} - -input MovieWorkersConnectionWhere { - AND: [MovieWorkersConnectionWhere!] - NOT: MovieWorkersConnectionWhere - OR: [MovieWorkersConnectionWhere!] - node: PersonWhere -} - -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort!] -} - -"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." -input PersonSort { - name: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_STARTS_WITH: String - "Return People where all of the related PersonWorksInProductionConnections match this filter" - worksInProductionConnection_ALL: PersonWorksInProductionConnectionWhere - "Return People where none of the related PersonWorksInProductionConnections match this filter" - worksInProductionConnection_NONE: PersonWorksInProductionConnectionWhere - "Return People where one of the related PersonWorksInProductionConnections match this filter" - worksInProductionConnection_SINGLE: PersonWorksInProductionConnectionWhere - "Return People where some of the related PersonWorksInProductionConnections match this filter" - worksInProductionConnection_SOME: PersonWorksInProductionConnectionWhere - "Return People where all of the related Productions match this filter" - worksInProduction_ALL: ProductionWhere - "Return People where none of the related Productions match this filter" - worksInProduction_NONE: ProductionWhere - "Return People where one of the related Productions match this filter" - worksInProduction_SINGLE: ProductionWhere - "Return People where some of the related Productions match this filter" - worksInProduction_SOME: ProductionWhere -} - -input PersonWorksInProductionConnectionSort { - node: ProductionSort -} - -input PersonWorksInProductionConnectionWhere { - AND: [PersonWorksInProductionConnectionWhere!] - NOT: PersonWorksInProductionConnectionWhere - OR: [PersonWorksInProductionConnectionWhere!] - node: ProductionWhere -} - -input ProductionOptions { - limit: Int - offset: Int - "Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ProductionSort] -} - -"Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object." -input ProductionSort { - viewers: SortDirection -} - -input ProductionWhere { - AND: [ProductionWhere!] - NOT: ProductionWhere - OR: [ProductionWhere!] - typename_IN: [ProductionImplementation!] - viewers: Int - viewers_GT: Int - viewers_GTE: Int - viewers_IN: [Int!] - viewers_LT: Int - viewers_LTE: Int -} - ----- - -== Should be supported in Relationship properties - -.Schema -[source,graphql,schema=true] ----- -type Person { - name: String! - actedInMovies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) -} - -type Movie { - title: String! - actors: [Person!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) -} - -type ActedIn @relationshipProperties { - roles: [String!] - pay: Float -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -""" -The edge properties for the following fields: -* Person.actedInMovies -* Movie.actors -""" -type ActedIn { - pay: Float - roles: [String!] -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Person! - properties: ActedIn! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - actedInMovies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInMoviesConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonActedInMoviesConnectionSort!], where: PersonActedInMoviesConnectionWhere): PersonActedInMoviesConnection! - name: String! -} - -type PersonActedInMoviesConnection { - edges: [PersonActedInMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonActedInMoviesRelationship { - cursor: String! - node: Movie! - properties: ActedIn! -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input ActedInSort { - pay: SortDirection - roles: SortDirection -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - pay: Float - pay_GT: Float - pay_GTE: Float - pay_IN: [Float] - pay_LT: Float - pay_LTE: Float - roles: [String!] - roles_INCLUDES: String -} - -input MovieActorsConnectionSort { - edge: ActedInSort - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - edge: ActedInWhere - node: PersonWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related People match this filter" - actors_ALL: PersonWhere - "Return Movies where none of the related People match this filter" - actors_NONE: PersonWhere - "Return Movies where one of the related People match this filter" - actors_SINGLE: PersonWhere - "Return Movies where some of the related People match this filter" - actors_SOME: PersonWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - -input PersonActedInMoviesConnectionSort { - edge: ActedInSort - node: MovieSort -} - -input PersonActedInMoviesConnectionWhere { - AND: [PersonActedInMoviesConnectionWhere!] - NOT: PersonActedInMoviesConnectionWhere - OR: [PersonActedInMoviesConnectionWhere!] - edge: ActedInWhere - node: MovieWhere -} - -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort!] -} - -"Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." -input PersonSort { - name: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - "Return People where all of the related PersonActedInMoviesConnections match this filter" - actedInMoviesConnection_ALL: PersonActedInMoviesConnectionWhere - "Return People where none of the related PersonActedInMoviesConnections match this filter" - actedInMoviesConnection_NONE: PersonActedInMoviesConnectionWhere - "Return People where one of the related PersonActedInMoviesConnections match this filter" - actedInMoviesConnection_SINGLE: PersonActedInMoviesConnectionWhere - "Return People where some of the related PersonActedInMoviesConnections match this filter" - actedInMoviesConnection_SOME: PersonActedInMoviesConnectionWhere - "Return People where all of the related Movies match this filter" - actedInMovies_ALL: MovieWhere - "Return People where none of the related Movies match this filter" - actedInMovies_NONE: MovieWhere - "Return People where one of the related Movies match this filter" - actedInMovies_SINGLE: MovieWhere - "Return People where some of the related Movies match this filter" - actedInMovies_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_STARTS_WITH: String -} - ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/math.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/math.js.adoc deleted file mode 100644 index a484de6a..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/math.js.adoc +++ /dev/null @@ -1,1053 +0,0 @@ -// This file was generated by the Test-Case extractor of neo4j-graphql -:toc: -:toclevels: 42 - -= Algebraic - -== Int fields should be extended with Increment/Decrement operators - -.Schema -[source,graphql,schema=true] ----- -type Movie { - id: ID - viewers: Int! -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - id: ID - viewers: Int! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection - viewers: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - viewers: Int - viewers_GT: Int - viewers_GTE: Int - viewers_IN: [Int!] - viewers_LT: Int - viewers_LTE: Int -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -== BigInt fields should be extended with Increment/Decrement operators - -.Schema -[source,graphql,schema=true] ----- -type Movie { - id: ID - viewers: BigInt! -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -""" -A BigInt value up to 64 bits in size, which can be a number or a string if used inline, or a string only if used as a variable. Always returned as a string. -""" -scalar BigInt - -type Movie { - id: ID - viewers: BigInt! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection - viewers: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - viewers: BigInt - viewers_GT: BigInt - viewers_GTE: BigInt - viewers_IN: [BigInt!] - viewers_LT: BigInt - viewers_LTE: BigInt -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -== Float fields should be extended with Add/Subtract/Multiply/Divide operators - -.Schema -[source,graphql,schema=true] ----- -type Movie { - id: ID - viewers: Float! -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - id: ID - viewers: Float! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection - viewers: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - viewers: Float - viewers_GT: Float - viewers_GTE: Float - viewers_IN: [Float!] - viewers_LT: Float - viewers_LTE: Float -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -== Operators should be presents in nested updates - -.Schema -[source,graphql,schema=true] ----- -type Movie { - id: ID - viewers: Int! - directedBy: Director @relationship(type: "DIRECTS", direction: IN) -} - -type Director { - lastName: String! - directs: [Movie!]! @relationship(type: "DIRECTS", direction: OUT) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Director { - directs(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - directsConnection(after: String, directed: Boolean = true, first: Int, sort: [DirectorDirectsConnectionSort!], where: DirectorDirectsConnectionWhere): DirectorDirectsConnection! - lastName: String! -} - -type DirectorDirectsConnection { - edges: [DirectorDirectsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input DirectorDirectsConnectionSort { - node: MovieSort -} - -input DirectorDirectsConnectionWhere { - AND: [DirectorDirectsConnectionWhere!] - NOT: DirectorDirectsConnectionWhere - OR: [DirectorDirectsConnectionWhere!] - node: MovieWhere -} - -type DirectorDirectsRelationship { - cursor: String! - node: Movie! -} - -type DirectorEdge { - cursor: String! - node: Director! -} - -input DirectorOptions { - limit: Int - offset: Int - """ - Specify one or more DirectorSort objects to sort Directors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [DirectorSort!] -} - -""" -Fields to sort Directors by. The order in which sorts are applied is not guaranteed when specifying many fields in one DirectorSort object. -""" -input DirectorSort { - lastName: SortDirection -} - -input DirectorWhere { - AND: [DirectorWhere!] - NOT: DirectorWhere - OR: [DirectorWhere!] - """ - Return Directors where all of the related DirectorDirectsConnections match this filter - """ - directsConnection_ALL: DirectorDirectsConnectionWhere - """ - Return Directors where none of the related DirectorDirectsConnections match this filter - """ - directsConnection_NONE: DirectorDirectsConnectionWhere - """ - Return Directors where one of the related DirectorDirectsConnections match this filter - """ - directsConnection_SINGLE: DirectorDirectsConnectionWhere - """ - Return Directors where some of the related DirectorDirectsConnections match this filter - """ - directsConnection_SOME: DirectorDirectsConnectionWhere - """Return Directors where all of the related Movies match this filter""" - directs_ALL: MovieWhere - """Return Directors where none of the related Movies match this filter""" - directs_NONE: MovieWhere - """Return Directors where one of the related Movies match this filter""" - directs_SINGLE: MovieWhere - """Return Directors where some of the related Movies match this filter""" - directs_SOME: MovieWhere - lastName: String - lastName_CONTAINS: String - lastName_ENDS_WITH: String - lastName_IN: [String!] - lastName_STARTS_WITH: String -} - -type DirectorsConnection { - edges: [DirectorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - directedBy(directed: Boolean = true, options: DirectorOptions, where: DirectorWhere): Director - directedByConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieDirectedByConnectionSort!], where: MovieDirectedByConnectionWhere): MovieDirectedByConnection! - id: ID - viewers: Int! -} - -type MovieDirectedByConnection { - edges: [MovieDirectedByRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieDirectedByConnectionSort { - node: DirectorSort -} - -input MovieDirectedByConnectionWhere { - AND: [MovieDirectedByConnectionWhere!] - NOT: MovieDirectedByConnectionWhere - OR: [MovieDirectedByConnectionWhere!] - node: DirectorWhere -} - -type MovieDirectedByRelationship { - cursor: String! - node: Director! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection - viewers: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - directedBy: DirectorWhere - directedByConnection: MovieDirectedByConnectionWhere - directedByConnection_NOT: MovieDirectedByConnectionWhere - directedBy_NOT: DirectorWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - viewers: Int - viewers_GT: Int - viewers_GTE: Int - viewers_IN: [Int!] - viewers_LT: Int - viewers_LTE: Int -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - directors(options: DirectorOptions, where: DirectorWhere): [Director!]! - directorsConnection(after: String, first: Int, sort: [DirectorSort], where: DirectorWhere): DirectorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -== Should be supported in interfaces - -.Schema -[source,graphql,schema=true] ----- -interface Production { - viewers: Int! -} - -type Movie implements Production { - id: ID - viewers: Int! - workers: [Person!]! @relationship(type: "WORKED_IN", direction: IN) -} - -type Person { - name: String! - worksInProduction: [Production!]! @relationship(type: "WORKED_IN", direction: OUT) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie implements Production { - id: ID - viewers: Int! - workers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - workersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieWorkersConnectionSort!], where: MovieWorkersConnectionWhere): MovieWorkersConnection! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - id: SortDirection - viewers: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - viewers: Int - viewers_GT: Int - viewers_GTE: Int - viewers_IN: [Int!] - viewers_LT: Int - viewers_LTE: Int - """ - Return Movies where all of the related MovieWorkersConnections match this filter - """ - workersConnection_ALL: MovieWorkersConnectionWhere - """ - Return Movies where none of the related MovieWorkersConnections match this filter - """ - workersConnection_NONE: MovieWorkersConnectionWhere - """ - Return Movies where one of the related MovieWorkersConnections match this filter - """ - workersConnection_SINGLE: MovieWorkersConnectionWhere - """ - Return Movies where some of the related MovieWorkersConnections match this filter - """ - workersConnection_SOME: MovieWorkersConnectionWhere - """Return Movies where all of the related People match this filter""" - workers_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - workers_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - workers_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - workers_SOME: PersonWhere -} - -type MovieWorkersConnection { - edges: [MovieWorkersRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieWorkersConnectionSort { - node: PersonSort -} - -input MovieWorkersConnectionWhere { - AND: [MovieWorkersConnectionWhere!] - NOT: MovieWorkersConnectionWhere - OR: [MovieWorkersConnectionWhere!] - node: PersonWhere -} - -type MovieWorkersRelationship { - cursor: String! - node: Person! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String! - worksInProduction(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - worksInProductionConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonWorksInProductionConnectionSort!], where: PersonWorksInProductionConnectionWhere): PersonWorksInProductionConnection! -} - -type PersonEdge { - cursor: String! - node: Person! -} - -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort!] -} - -""" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -""" -input PersonSort { - name: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_STARTS_WITH: String - """ - Return People where all of the related PersonWorksInProductionConnections match this filter - """ - worksInProductionConnection_ALL: PersonWorksInProductionConnectionWhere - """ - Return People where none of the related PersonWorksInProductionConnections match this filter - """ - worksInProductionConnection_NONE: PersonWorksInProductionConnectionWhere - """ - Return People where one of the related PersonWorksInProductionConnections match this filter - """ - worksInProductionConnection_SINGLE: PersonWorksInProductionConnectionWhere - """ - Return People where some of the related PersonWorksInProductionConnections match this filter - """ - worksInProductionConnection_SOME: PersonWorksInProductionConnectionWhere - """Return People where all of the related Productions match this filter""" - worksInProduction_ALL: ProductionWhere - """Return People where none of the related Productions match this filter""" - worksInProduction_NONE: ProductionWhere - """Return People where one of the related Productions match this filter""" - worksInProduction_SINGLE: ProductionWhere - """Return People where some of the related Productions match this filter""" - worksInProduction_SOME: ProductionWhere -} - -type PersonWorksInProductionConnection { - edges: [PersonWorksInProductionRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWorksInProductionConnectionSort { - node: ProductionSort -} - -input PersonWorksInProductionConnectionWhere { - AND: [PersonWorksInProductionConnectionWhere!] - NOT: PersonWorksInProductionConnectionWhere - OR: [PersonWorksInProductionConnectionWhere!] - node: ProductionWhere -} - -type PersonWorksInProductionRelationship { - cursor: String! - node: Production! -} - -interface Production { - viewers: Int! -} - -type ProductionEdge { - cursor: String! - node: Production! -} - -enum ProductionImplementation { - Movie -} - -input ProductionOptions { - limit: Int - offset: Int - """ - Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ProductionSort] -} - -""" -Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. -""" -input ProductionSort { - viewers: SortDirection -} - -input ProductionWhere { - AND: [ProductionWhere!] - NOT: ProductionWhere - OR: [ProductionWhere!] - typename_IN: [ProductionImplementation!] - viewers: Int - viewers_GT: Int - viewers_GTE: Int - viewers_IN: [Int!] - viewers_LT: Int - viewers_LTE: Int -} - -type ProductionsConnection { - edges: [ProductionEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -== Should be supported in Relationship properties - -.Schema -[source,graphql,schema=true] ----- -type Person { - name: String! - actedInMovies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) -} - -type Movie { - title: String! - actors: [Person!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) -} - -type ActedIn @relationshipProperties { - roles: [String!] - pay: Float -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -""" -The edge properties for the following fields: -* Person.actedInMovies -* Movie.actors -""" -type ActedIn { - pay: Float - roles: [String!] -} - -input ActedInSort { - pay: SortDirection - roles: SortDirection -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - pay: Float - pay_GT: Float - pay_GTE: Float - pay_IN: [Float] - pay_LT: Float - pay_LTE: Float - roles: [String!] - roles_INCLUDES: String -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - edge: ActedInSort - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - edge: ActedInWhere - node: PersonWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! - properties: ActedIn! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related People match this filter""" - actors_ALL: PersonWhere - """Return Movies where none of the related People match this filter""" - actors_NONE: PersonWhere - """Return Movies where one of the related People match this filter""" - actors_SINGLE: PersonWhere - """Return Movies where some of the related People match this filter""" - actors_SOME: PersonWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - actedInMovies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInMoviesConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonActedInMoviesConnectionSort!], where: PersonActedInMoviesConnectionWhere): PersonActedInMoviesConnection! - name: String! -} - -type PersonActedInMoviesConnection { - edges: [PersonActedInMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonActedInMoviesConnectionSort { - edge: ActedInSort - node: MovieSort -} - -input PersonActedInMoviesConnectionWhere { - AND: [PersonActedInMoviesConnectionWhere!] - NOT: PersonActedInMoviesConnectionWhere - OR: [PersonActedInMoviesConnectionWhere!] - edge: ActedInWhere - node: MovieWhere -} - -type PersonActedInMoviesRelationship { - cursor: String! - node: Movie! - properties: ActedIn! -} - -type PersonEdge { - cursor: String! - node: Person! -} - -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort!] -} - -""" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -""" -input PersonSort { - name: SortDirection -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - """ - Return People where all of the related PersonActedInMoviesConnections match this filter - """ - actedInMoviesConnection_ALL: PersonActedInMoviesConnectionWhere - """ - Return People where none of the related PersonActedInMoviesConnections match this filter - """ - actedInMoviesConnection_NONE: PersonActedInMoviesConnectionWhere - """ - Return People where one of the related PersonActedInMoviesConnections match this filter - """ - actedInMoviesConnection_SINGLE: PersonActedInMoviesConnectionWhere - """ - Return People where some of the related PersonActedInMoviesConnections match this filter - """ - actedInMoviesConnection_SOME: PersonActedInMoviesConnectionWhere - """Return People where all of the related Movies match this filter""" - actedInMovies_ALL: MovieWhere - """Return People where none of the related Movies match this filter""" - actedInMovies_NONE: MovieWhere - """Return People where one of the related Movies match this filter""" - actedInMovies_SINGLE: MovieWhere - """Return People where some of the related Movies match this filter""" - actedInMovies_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/nested-aggregation-on-interface.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/nested-aggregation-on-interface.adoc deleted file mode 100644 index 6c6b30f9..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/nested-aggregation-on-interface.adoc +++ /dev/null @@ -1,642 +0,0 @@ -:toc: -:toclevels: 42 - -= nested aggregation on interface - -== Setup - -.Schema -[source,graphql,schema=true] ----- -interface Production { - title: String! - cost: Float! -} - -type Movie implements Production { - title: String! - cost: Float! - runtime: Int! -} - -type Series implements Production { - title: String! - cost: Float! - episodes: Int! -} - -type ActedIn @relationshipProperties { - screenTime: Int! -} - -type Actor { - name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") -} ----- - -== should generate the correct schema - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -interface Production { - cost: Float! - title: String! -} - -""" -The edge properties for the following fields: -* Actor.actedIn -""" -type ActedIn { - screenTime: Int! -} - -type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type ActorActedInRelationship { - cursor: String! - node: Production! - properties: ActedIn! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie implements Production { - cost: Float! - runtime: Int! - title: String! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type ProductionEdge { - cursor: String! - node: Production! -} - -type ProductionsConnection { - edges: [ProductionEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements Production { - cost: Float! - episodes: Int! - title: String! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -enum ProductionImplementation { - Movie - Series -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input ActedInSort { - screenTime: SortDirection -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int -} - -input ActorActedInConnectionSort { - edge: ActedInSort - node: ProductionSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - node: ProductionWhere -} - -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - -"Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." -input ActorSort { - name: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - "Return Actors where all of the related ActorActedInConnections match this filter" - actedInConnection_ALL: ActorActedInConnectionWhere - "Return Actors where none of the related ActorActedInConnections match this filter" - actedInConnection_NONE: ActorActedInConnectionWhere - "Return Actors where one of the related ActorActedInConnections match this filter" - actedInConnection_SINGLE: ActorActedInConnectionWhere - "Return Actors where some of the related ActorActedInConnections match this filter" - actedInConnection_SOME: ActorActedInConnectionWhere - "Return Actors where all of the related Productions match this filter" - actedIn_ALL: ProductionWhere - "Return Actors where none of the related Productions match this filter" - actedIn_NONE: ProductionWhere - "Return Actors where one of the related Productions match this filter" - actedIn_SINGLE: ProductionWhere - "Return Actors where some of the related Productions match this filter" - actedIn_SOME: ProductionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_STARTS_WITH: String -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - cost: SortDirection - runtime: SortDirection - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - cost: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - -input ProductionOptions { - limit: Int - offset: Int - "Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ProductionSort] -} - -"Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object." -input ProductionSort { - cost: SortDirection - title: SortDirection -} - -input ProductionWhere { - AND: [ProductionWhere!] - NOT: ProductionWhere - OR: [ProductionWhere!] - cost: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] -} - -input SeriesOptions { - limit: Int - offset: Int - "Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array." - sort: [SeriesSort!] -} - -"Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object." -input SeriesSort { - cost: SortDirection - episodes: SortDirection - title: SortDirection -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - cost: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - episodes: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - ----- - -== aggregate false should generate the correct schema without aggregations - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -interface Production { - cost: Float! - title: String! -} - -""" -The edge properties for the following fields: -* Actor.actedIn -""" -type ActedIn { - screenTime: Int! -} - -type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type ActorActedInRelationship { - cursor: String! - node: Production! - properties: ActedIn! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie implements Production { - cost: Float! - runtime: Int! - title: String! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type ProductionEdge { - cursor: String! - node: Production! -} - -type ProductionsConnection { - edges: [ProductionEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements Production { - cost: Float! - episodes: Int! - title: String! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -enum ProductionImplementation { - Movie - Series -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input ActedInSort { - screenTime: SortDirection -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int -} - -input ActorActedInConnectionSort { - edge: ActedInSort - node: ProductionSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - node: ProductionWhere -} - -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - -"Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." -input ActorSort { - name: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - "Return Actors where all of the related ActorActedInConnections match this filter" - actedInConnection_ALL: ActorActedInConnectionWhere - "Return Actors where none of the related ActorActedInConnections match this filter" - actedInConnection_NONE: ActorActedInConnectionWhere - "Return Actors where one of the related ActorActedInConnections match this filter" - actedInConnection_SINGLE: ActorActedInConnectionWhere - "Return Actors where some of the related ActorActedInConnections match this filter" - actedInConnection_SOME: ActorActedInConnectionWhere - "Return Actors where all of the related Productions match this filter" - actedIn_ALL: ProductionWhere - "Return Actors where none of the related Productions match this filter" - actedIn_NONE: ProductionWhere - "Return Actors where one of the related Productions match this filter" - actedIn_SINGLE: ProductionWhere - "Return Actors where some of the related Productions match this filter" - actedIn_SOME: ProductionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_STARTS_WITH: String -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - cost: SortDirection - runtime: SortDirection - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - cost: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - -input ProductionOptions { - limit: Int - offset: Int - "Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ProductionSort] -} - -"Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object." -input ProductionSort { - cost: SortDirection - title: SortDirection -} - -input ProductionWhere { - AND: [ProductionWhere!] - NOT: ProductionWhere - OR: [ProductionWhere!] - cost: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] -} - -input SeriesOptions { - limit: Int - offset: Int - "Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array." - sort: [SeriesSort!] -} - -"Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object." -input SeriesSort { - cost: SortDirection - episodes: SortDirection - title: SortDirection -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - cost: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - episodes: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/nested-aggregation-on-interface.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/nested-aggregation-on-interface.js.adoc deleted file mode 100644 index 3efcb768..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/nested-aggregation-on-interface.js.adoc +++ /dev/null @@ -1,689 +0,0 @@ -// This file was generated by the Test-Case extractor of neo4j-graphql -:toc: -:toclevels: 42 - -= nested aggregation on interface - -== Setup - -.Schema -[source,graphql,schema=true] ----- -interface Production { - title: String! - cost: Float! -} - -type Movie implements Production { - title: String! - cost: Float! - runtime: Int! -} - -type Series implements Production { - title: String! - cost: Float! - episodes: Int! -} - -type ActedIn @relationshipProperties { - screenTime: Int! -} - -type Actor { - name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") -} ----- - -== should generate the correct schema - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -""" -The edge properties for the following fields: -* Actor.actedIn -""" -type ActedIn { - screenTime: Int! -} - -input ActedInSort { - screenTime: SortDirection -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int -} - -type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionSort { - edge: ActedInSort - node: ProductionSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - node: ProductionWhere -} - -type ActorActedInRelationship { - cursor: String! - node: Production! - properties: ActedIn! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - -""" -Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. -""" -input ActorSort { - name: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - """ - Return Actors where all of the related ActorActedInConnections match this filter - """ - actedInConnection_ALL: ActorActedInConnectionWhere - """ - Return Actors where none of the related ActorActedInConnections match this filter - """ - actedInConnection_NONE: ActorActedInConnectionWhere - """ - Return Actors where one of the related ActorActedInConnections match this filter - """ - actedInConnection_SINGLE: ActorActedInConnectionWhere - """ - Return Actors where some of the related ActorActedInConnections match this filter - """ - actedInConnection_SOME: ActorActedInConnectionWhere - """Return Actors where all of the related Productions match this filter""" - actedIn_ALL: ProductionWhere - """Return Actors where none of the related Productions match this filter""" - actedIn_NONE: ProductionWhere - """Return Actors where one of the related Productions match this filter""" - actedIn_SINGLE: ProductionWhere - """Return Actors where some of the related Productions match this filter""" - actedIn_SOME: ProductionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie implements Production { - cost: Float! - runtime: Int! - title: String! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - cost: SortDirection - runtime: SortDirection - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - cost: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Production { - cost: Float! - title: String! -} - -type ProductionEdge { - cursor: String! - node: Production! -} - -enum ProductionImplementation { - Movie - Series -} - -input ProductionOptions { - limit: Int - offset: Int - """ - Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ProductionSort] -} - -""" -Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. -""" -input ProductionSort { - cost: SortDirection - title: SortDirection -} - -input ProductionWhere { - AND: [ProductionWhere!] - NOT: ProductionWhere - OR: [ProductionWhere!] - cost: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] -} - -type ProductionsConnection { - edges: [ProductionEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements Production { - cost: Float! - episodes: Int! - title: String! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -input SeriesOptions { - limit: Int - offset: Int - """ - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [SeriesSort!] -} - -""" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -""" -input SeriesSort { - cost: SortDirection - episodes: SortDirection - title: SortDirection -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - cost: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - episodes: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -== aggregate false should generate the correct schema without aggregations - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -""" -The edge properties for the following fields: -* Actor.actedIn -""" -type ActedIn { - screenTime: Int! -} - -input ActedInSort { - screenTime: SortDirection -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int -} - -type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionSort { - edge: ActedInSort - node: ProductionSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - node: ProductionWhere -} - -type ActorActedInRelationship { - cursor: String! - node: Production! - properties: ActedIn! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - -""" -Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. -""" -input ActorSort { - name: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - """ - Return Actors where all of the related ActorActedInConnections match this filter - """ - actedInConnection_ALL: ActorActedInConnectionWhere - """ - Return Actors where none of the related ActorActedInConnections match this filter - """ - actedInConnection_NONE: ActorActedInConnectionWhere - """ - Return Actors where one of the related ActorActedInConnections match this filter - """ - actedInConnection_SINGLE: ActorActedInConnectionWhere - """ - Return Actors where some of the related ActorActedInConnections match this filter - """ - actedInConnection_SOME: ActorActedInConnectionWhere - """Return Actors where all of the related Productions match this filter""" - actedIn_ALL: ProductionWhere - """Return Actors where none of the related Productions match this filter""" - actedIn_NONE: ProductionWhere - """Return Actors where one of the related Productions match this filter""" - actedIn_SINGLE: ProductionWhere - """Return Actors where some of the related Productions match this filter""" - actedIn_SOME: ProductionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie implements Production { - cost: Float! - runtime: Int! - title: String! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - cost: SortDirection - runtime: SortDirection - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - cost: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Production { - cost: Float! - title: String! -} - -type ProductionEdge { - cursor: String! - node: Production! -} - -enum ProductionImplementation { - Movie - Series -} - -input ProductionOptions { - limit: Int - offset: Int - """ - Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ProductionSort] -} - -""" -Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. -""" -input ProductionSort { - cost: SortDirection - title: SortDirection -} - -input ProductionWhere { - AND: [ProductionWhere!] - NOT: ProductionWhere - OR: [ProductionWhere!] - cost: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] -} - -type ProductionsConnection { - edges: [ProductionEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements Production { - cost: Float! - episodes: Int! - title: String! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -input SeriesOptions { - limit: Int - offset: Int - """ - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [SeriesSort!] -} - -""" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -""" -input SeriesSort { - cost: SortDirection - episodes: SortDirection - title: SortDirection -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - cost: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - episodes: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_STARTS_WITH: String -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/plural.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/plural.adoc deleted file mode 100644 index 1e49c025..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/plural.adoc +++ /dev/null @@ -1,199 +0,0 @@ -:toc: -:toclevels: 42 - -= Plural option - -== Plural on interface and union - -.Schema -[source,graphql,schema=true] ----- -interface Animal @plural(value: "animales") { - name: String -} - -type Dog implements Animal { - name: String - breed: String -} - -type Cat { - queenOf: String -} - -union Pet @plural(value: "petties") = Dog | Cat ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -interface Animal { - name: String -} - -union Pet = Cat | Dog - -type AnimalEdge { - cursor: String! - node: Animal! -} - -type AnimalesConnection { - edges: [AnimalEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Cat { - queenOf: String -} - -type CatEdge { - cursor: String! - node: Cat! -} - -type CatsConnection { - edges: [CatEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Dog implements Animal { - breed: String - name: String -} - -type DogEdge { - cursor: String! - node: Dog! -} - -type DogsConnection { - edges: [DogEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - animales(options: AnimalOptions, where: AnimalWhere): [Animal!]! - animalesConnection(after: String, first: Int, sort: [AnimalSort], where: AnimalWhere): AnimalesConnection! - cats(options: CatOptions, where: CatWhere): [Cat!]! - catsConnection(after: String, first: Int, sort: [CatSort], where: CatWhere): CatsConnection! - dogs(options: DogOptions, where: DogWhere): [Dog!]! - dogsConnection(after: String, first: Int, sort: [DogSort], where: DogWhere): DogsConnection! - petties(options: QueryOptions, where: PetWhere): [Pet!]! -} - -enum AnimalImplementation { - Dog -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input AnimalOptions { - limit: Int - offset: Int - "Specify one or more AnimalSort objects to sort Animales by. The sorts will be applied in the order in which they are arranged in the array." - sort: [AnimalSort] -} - -"Fields to sort Animales by. The order in which sorts are applied is not guaranteed when specifying many fields in one AnimalSort object." -input AnimalSort { - name: SortDirection -} - -input AnimalWhere { - AND: [AnimalWhere!] - NOT: AnimalWhere - OR: [AnimalWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - typename_IN: [AnimalImplementation!] -} - -input CatOptions { - limit: Int - offset: Int - "Specify one or more CatSort objects to sort Cats by. The sorts will be applied in the order in which they are arranged in the array." - sort: [CatSort!] -} - -"Fields to sort Cats by. The order in which sorts are applied is not guaranteed when specifying many fields in one CatSort object." -input CatSort { - queenOf: SortDirection -} - -input CatWhere { - AND: [CatWhere!] - NOT: CatWhere - OR: [CatWhere!] - queenOf: String - queenOf_CONTAINS: String - queenOf_ENDS_WITH: String - queenOf_IN: [String] - queenOf_STARTS_WITH: String -} - -input DogOptions { - limit: Int - offset: Int - "Specify one or more DogSort objects to sort Dogs by. The sorts will be applied in the order in which they are arranged in the array." - sort: [DogSort!] -} - -"Fields to sort Dogs by. The order in which sorts are applied is not guaranteed when specifying many fields in one DogSort object." -input DogSort { - breed: SortDirection - name: SortDirection -} - -input DogWhere { - AND: [DogWhere!] - NOT: DogWhere - OR: [DogWhere!] - breed: String - breed_CONTAINS: String - breed_ENDS_WITH: String - breed_IN: [String] - breed_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -input PetWhere { - Cat: CatWhere - Dog: DogWhere -} - -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/plural.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/plural.js.adoc deleted file mode 100644 index 14bb816d..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/plural.js.adoc +++ /dev/null @@ -1,211 +0,0 @@ -// This file was generated by the Test-Case extractor of neo4j-graphql -:toc: -:toclevels: 42 - -= Plural option - -== Plural on interface and union - -.Schema -[source,graphql,schema=true] ----- -interface Animal @plural(value: "animales") { - name: String -} - -type Dog implements Animal { - name: String - breed: String -} - -type Cat { - queenOf: String -} - -union Pet @plural(value: "petties") = Dog | Cat ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -interface Animal { - name: String -} - -type AnimalEdge { - cursor: String! - node: Animal! -} - -enum AnimalImplementation { - Dog -} - -input AnimalOptions { - limit: Int - offset: Int - """ - Specify one or more AnimalSort objects to sort Animales by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [AnimalSort] -} - -""" -Fields to sort Animales by. The order in which sorts are applied is not guaranteed when specifying many fields in one AnimalSort object. -""" -input AnimalSort { - name: SortDirection -} - -input AnimalWhere { - AND: [AnimalWhere!] - NOT: AnimalWhere - OR: [AnimalWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String - typename_IN: [AnimalImplementation!] -} - -type AnimalesConnection { - edges: [AnimalEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Cat { - queenOf: String -} - -type CatEdge { - cursor: String! - node: Cat! -} - -input CatOptions { - limit: Int - offset: Int - """ - Specify one or more CatSort objects to sort Cats by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [CatSort!] -} - -""" -Fields to sort Cats by. The order in which sorts are applied is not guaranteed when specifying many fields in one CatSort object. -""" -input CatSort { - queenOf: SortDirection -} - -input CatWhere { - AND: [CatWhere!] - NOT: CatWhere - OR: [CatWhere!] - queenOf: String - queenOf_CONTAINS: String - queenOf_ENDS_WITH: String - queenOf_IN: [String] - queenOf_STARTS_WITH: String -} - -type CatsConnection { - edges: [CatEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Dog implements Animal { - breed: String - name: String -} - -type DogEdge { - cursor: String! - node: Dog! -} - -input DogOptions { - limit: Int - offset: Int - """ - Specify one or more DogSort objects to sort Dogs by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [DogSort!] -} - -""" -Fields to sort Dogs by. The order in which sorts are applied is not guaranteed when specifying many fields in one DogSort object. -""" -input DogSort { - breed: SortDirection - name: SortDirection -} - -input DogWhere { - AND: [DogWhere!] - NOT: DogWhere - OR: [DogWhere!] - breed: String - breed_CONTAINS: String - breed_ENDS_WITH: String - breed_IN: [String] - breed_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_STARTS_WITH: String -} - -type DogsConnection { - edges: [DogEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Pet = Cat | Dog - -input PetWhere { - Cat: CatWhere - Dog: DogWhere -} - -type Query { - animales(options: AnimalOptions, where: AnimalWhere): [Animal!]! - animalesConnection(after: String, first: Int, sort: [AnimalSort], where: AnimalWhere): AnimalesConnection! - cats(options: CatOptions, where: CatWhere): [Cat!]! - catsConnection(after: String, first: Int, sort: [CatSort], where: CatWhere): CatsConnection! - dogs(options: DogOptions, where: DogWhere): [Dog!]! - dogsConnection(after: String, first: Int, sort: [DogSort], where: DogWhere): DogsConnection! - petties(options: QueryOptions, where: PetWhere): [Pet!]! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/subscriptions.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/subscriptions.adoc deleted file mode 100644 index cf05bdfe..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/subscriptions.adoc +++ /dev/null @@ -1,946 +0,0 @@ -:toc: -:toclevels: 42 - -= Subscriptions - -== Subscriptions - -.Schema -[source,graphql,schema=true] ----- -type Movie { - id: ID - actorCount: Int - averageRating: Float - isActive: Boolean - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) -} - -type Actor { - name: String! -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Actor { - name: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actorCount: Int - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - averageRating: Float - id: ID - isActive: Boolean -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - -"Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." -input ActorSort { - name: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_STARTS_WITH: String -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - actorCount: SortDirection - averageRating: SortDirection - id: SortDirection - isActive: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related Actors match this filter" - actors_ALL: ActorWhere - "Return Movies where none of the related Actors match this filter" - actors_NONE: ActorWhere - "Return Movies where one of the related Actors match this filter" - actors_SINGLE: ActorWhere - "Return Movies where some of the related Actors match this filter" - actors_SOME: ActorWhere - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - isActive: Boolean -} - ----- - -== Empty EventPayload type - -.Schema -[source,graphql,schema=true] ----- -type Movie { - id: ID - actorCount: Int - averageRating: Float - isActive: Boolean - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) -} - -type Actor { - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actorCount: Int - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - averageRating: Float - id: ID - isActive: Boolean -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere -} - -input ActorOptions { - limit: Int - offset: Int -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - "Return Actors where all of the related ActorMoviesConnections match this filter" - moviesConnection_ALL: ActorMoviesConnectionWhere - "Return Actors where none of the related ActorMoviesConnections match this filter" - moviesConnection_NONE: ActorMoviesConnectionWhere - "Return Actors where one of the related ActorMoviesConnections match this filter" - moviesConnection_SINGLE: ActorMoviesConnectionWhere - "Return Actors where some of the related ActorMoviesConnections match this filter" - moviesConnection_SOME: ActorMoviesConnectionWhere - "Return Actors where all of the related Movies match this filter" - movies_ALL: MovieWhere - "Return Actors where none of the related Movies match this filter" - movies_NONE: MovieWhere - "Return Actors where one of the related Movies match this filter" - movies_SINGLE: MovieWhere - "Return Actors where some of the related Movies match this filter" - movies_SOME: MovieWhere -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - actorCount: SortDirection - averageRating: SortDirection - id: SortDirection - isActive: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related Actors match this filter" - actors_ALL: ActorWhere - "Return Movies where none of the related Actors match this filter" - actors_NONE: ActorWhere - "Return Movies where one of the related Actors match this filter" - actors_SINGLE: ActorWhere - "Return Movies where some of the related Actors match this filter" - actors_SOME: ActorWhere - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - isActive: Boolean -} - ----- - -== Empty EventPayload type on Union type - -.Schema -[source,graphql,schema=true] ----- -type Movie { - id: ID - actorCount: Int - averageRating: Float - isActive: Boolean - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) -} - -union Actor = Star | Person - -type Star { - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} - -type Person { - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -union Actor = Person | Star - -type Movie { - actorCount: Int - actors(directed: Boolean = true, options: QueryOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - averageRating: Float - id: ID - isActive: Boolean -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type PersonMoviesConnection { - edges: [PersonMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonMoviesRelationship { - cursor: String! - node: Movie! -} - -type Query { - actors(options: QueryOptions, where: ActorWhere): [Actor!]! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, where: PersonWhere): PeopleConnection! - stars(options: StarOptions, where: StarWhere): [Star!]! - starsConnection(after: String, first: Int, where: StarWhere): StarsConnection! -} - -type Star { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [StarMoviesConnectionSort!], where: StarMoviesConnectionWhere): StarMoviesConnection! -} - -type StarEdge { - cursor: String! - node: Star! -} - -type StarMoviesConnection { - edges: [StarMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type StarMoviesRelationship { - cursor: String! - node: Movie! -} - -type StarsConnection { - edges: [StarEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input ActorWhere { - Person: PersonWhere - Star: StarWhere -} - -input MovieActorsConnectionWhere { - Person: MovieActorsPersonConnectionWhere - Star: MovieActorsStarConnectionWhere -} - -input MovieActorsPersonConnectionWhere { - AND: [MovieActorsPersonConnectionWhere!] - NOT: MovieActorsPersonConnectionWhere - OR: [MovieActorsPersonConnectionWhere!] - node: PersonWhere -} - -input MovieActorsStarConnectionWhere { - AND: [MovieActorsStarConnectionWhere!] - NOT: MovieActorsStarConnectionWhere - OR: [MovieActorsStarConnectionWhere!] - node: StarWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - actorCount: SortDirection - averageRating: SortDirection - id: SortDirection - isActive: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related Actors match this filter" - actors_ALL: ActorWhere - "Return Movies where none of the related Actors match this filter" - actors_NONE: ActorWhere - "Return Movies where one of the related Actors match this filter" - actors_SINGLE: ActorWhere - "Return Movies where some of the related Actors match this filter" - actors_SOME: ActorWhere - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - isActive: Boolean -} - -input PersonMoviesConnectionSort { - node: MovieSort -} - -input PersonMoviesConnectionWhere { - AND: [PersonMoviesConnectionWhere!] - NOT: PersonMoviesConnectionWhere - OR: [PersonMoviesConnectionWhere!] - node: MovieWhere -} - -input PersonOptions { - limit: Int - offset: Int -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - "Return People where all of the related PersonMoviesConnections match this filter" - moviesConnection_ALL: PersonMoviesConnectionWhere - "Return People where none of the related PersonMoviesConnections match this filter" - moviesConnection_NONE: PersonMoviesConnectionWhere - "Return People where one of the related PersonMoviesConnections match this filter" - moviesConnection_SINGLE: PersonMoviesConnectionWhere - "Return People where some of the related PersonMoviesConnections match this filter" - moviesConnection_SOME: PersonMoviesConnectionWhere - "Return People where all of the related Movies match this filter" - movies_ALL: MovieWhere - "Return People where none of the related Movies match this filter" - movies_NONE: MovieWhere - "Return People where one of the related Movies match this filter" - movies_SINGLE: MovieWhere - "Return People where some of the related Movies match this filter" - movies_SOME: MovieWhere -} - -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - -input StarMoviesConnectionSort { - node: MovieSort -} - -input StarMoviesConnectionWhere { - AND: [StarMoviesConnectionWhere!] - NOT: StarMoviesConnectionWhere - OR: [StarMoviesConnectionWhere!] - node: MovieWhere -} - -input StarOptions { - limit: Int - offset: Int -} - -input StarWhere { - AND: [StarWhere!] - NOT: StarWhere - OR: [StarWhere!] - "Return Stars where all of the related StarMoviesConnections match this filter" - moviesConnection_ALL: StarMoviesConnectionWhere - "Return Stars where none of the related StarMoviesConnections match this filter" - moviesConnection_NONE: StarMoviesConnectionWhere - "Return Stars where one of the related StarMoviesConnections match this filter" - moviesConnection_SINGLE: StarMoviesConnectionWhere - "Return Stars where some of the related StarMoviesConnections match this filter" - moviesConnection_SOME: StarMoviesConnectionWhere - "Return Stars where all of the related Movies match this filter" - movies_ALL: MovieWhere - "Return Stars where none of the related Movies match this filter" - movies_NONE: MovieWhere - "Return Stars where one of the related Movies match this filter" - movies_SINGLE: MovieWhere - "Return Stars where some of the related Movies match this filter" - movies_SOME: MovieWhere -} - ----- - -== Empty EventPayload type, but @relationshipProperty exists - -.Schema -[source,graphql,schema=true] ----- -type Movie { - id: ID - actorCount: Int - averageRating: Float - isActive: Boolean - actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) -} - -type ActedIn @relationshipProperties { - screenTime: Int! -} - -type Actor { - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -""" -The edge properties for the following fields: -* Movie.actors -""" -type ActedIn { - screenTime: Int! -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actorCount: Int - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - averageRating: Float - id: ID - isActive: Boolean -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! - properties: ActedIn! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input ActedInSort { - screenTime: SortDirection -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere -} - -input ActorOptions { - limit: Int - offset: Int -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - "Return Actors where all of the related ActorMoviesConnections match this filter" - moviesConnection_ALL: ActorMoviesConnectionWhere - "Return Actors where none of the related ActorMoviesConnections match this filter" - moviesConnection_NONE: ActorMoviesConnectionWhere - "Return Actors where one of the related ActorMoviesConnections match this filter" - moviesConnection_SINGLE: ActorMoviesConnectionWhere - "Return Actors where some of the related ActorMoviesConnections match this filter" - moviesConnection_SOME: ActorMoviesConnectionWhere - "Return Actors where all of the related Movies match this filter" - movies_ALL: MovieWhere - "Return Actors where none of the related Movies match this filter" - movies_NONE: MovieWhere - "Return Actors where one of the related Movies match this filter" - movies_SINGLE: MovieWhere - "Return Actors where some of the related Movies match this filter" - movies_SOME: MovieWhere -} - -input MovieActorsConnectionSort { - edge: ActedInSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - edge: ActedInWhere - node: ActorWhere -} - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - actorCount: SortDirection - averageRating: SortDirection - id: SortDirection - isActive: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - "Return Movies where all of the related MovieActorsConnections match this filter" - actorsConnection_ALL: MovieActorsConnectionWhere - "Return Movies where none of the related MovieActorsConnections match this filter" - actorsConnection_NONE: MovieActorsConnectionWhere - "Return Movies where one of the related MovieActorsConnections match this filter" - actorsConnection_SINGLE: MovieActorsConnectionWhere - "Return Movies where some of the related MovieActorsConnections match this filter" - actorsConnection_SOME: MovieActorsConnectionWhere - "Return Movies where all of the related Actors match this filter" - actors_ALL: ActorWhere - "Return Movies where none of the related Actors match this filter" - actors_NONE: ActorWhere - "Return Movies where one of the related Actors match this filter" - actors_SINGLE: ActorWhere - "Return Movies where some of the related Actors match this filter" - actors_SOME: ActorWhere - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - isActive: Boolean -} - ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/subscriptions.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/subscriptions.js.adoc deleted file mode 100644 index 67086a4d..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/experimental-schema/subscriptions.js.adoc +++ /dev/null @@ -1,1027 +0,0 @@ -// This file was generated by the Test-Case extractor of neo4j-graphql -:toc: -:toclevels: 42 - -= Subscriptions - -== Subscriptions - -.Schema -[source,graphql,schema=true] ----- -type Movie { - id: ID - actorCount: Int - averageRating: Float - isActive: Boolean - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) -} - -type Actor { - name: String! -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Actor { - name: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - -""" -Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. -""" -input ActorSort { - name: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actorCount: Int - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - averageRating: Float - id: ID - isActive: Boolean -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - actorCount: SortDirection - averageRating: SortDirection - id: SortDirection - isActive: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related Actors match this filter""" - actors_ALL: ActorWhere - """Return Movies where none of the related Actors match this filter""" - actors_NONE: ActorWhere - """Return Movies where one of the related Actors match this filter""" - actors_SINGLE: ActorWhere - """Return Movies where some of the related Actors match this filter""" - actors_SOME: ActorWhere - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - isActive: Boolean -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -== Empty EventPayload type - -.Schema -[source,graphql,schema=true] ----- -type Movie { - id: ID - actorCount: Int - averageRating: Float - isActive: Boolean - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) -} - -type Actor { - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorOptions { - limit: Int - offset: Int -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - """ - Return Actors where all of the related ActorMoviesConnections match this filter - """ - moviesConnection_ALL: ActorMoviesConnectionWhere - """ - Return Actors where none of the related ActorMoviesConnections match this filter - """ - moviesConnection_NONE: ActorMoviesConnectionWhere - """ - Return Actors where one of the related ActorMoviesConnections match this filter - """ - moviesConnection_SINGLE: ActorMoviesConnectionWhere - """ - Return Actors where some of the related ActorMoviesConnections match this filter - """ - moviesConnection_SOME: ActorMoviesConnectionWhere - """Return Actors where all of the related Movies match this filter""" - movies_ALL: MovieWhere - """Return Actors where none of the related Movies match this filter""" - movies_NONE: MovieWhere - """Return Actors where one of the related Movies match this filter""" - movies_SINGLE: MovieWhere - """Return Actors where some of the related Movies match this filter""" - movies_SOME: MovieWhere -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actorCount: Int - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - averageRating: Float - id: ID - isActive: Boolean -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - actorCount: SortDirection - averageRating: SortDirection - id: SortDirection - isActive: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related Actors match this filter""" - actors_ALL: ActorWhere - """Return Movies where none of the related Actors match this filter""" - actors_NONE: ActorWhere - """Return Movies where one of the related Actors match this filter""" - actors_SINGLE: ActorWhere - """Return Movies where some of the related Actors match this filter""" - actors_SOME: ActorWhere - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - isActive: Boolean -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- - -== Empty EventPayload type on Union type - -.Schema -[source,graphql,schema=true] ----- -type Movie { - id: ID - actorCount: Int - averageRating: Float - isActive: Boolean - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) -} - -union Actor = Star | Person - -type Star { - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} - -type Person { - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -union Actor = Person | Star - -input ActorWhere { - Person: PersonWhere - Star: StarWhere -} - -type Movie { - actorCount: Int - actors(directed: Boolean = true, options: QueryOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - averageRating: Float - id: ID - isActive: Boolean -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - Person: MovieActorsPersonConnectionWhere - Star: MovieActorsStarConnectionWhere -} - -input MovieActorsPersonConnectionWhere { - AND: [MovieActorsPersonConnectionWhere!] - NOT: MovieActorsPersonConnectionWhere - OR: [MovieActorsPersonConnectionWhere!] - node: PersonWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -input MovieActorsStarConnectionWhere { - AND: [MovieActorsStarConnectionWhere!] - NOT: MovieActorsStarConnectionWhere - OR: [MovieActorsStarConnectionWhere!] - node: StarWhere -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - actorCount: SortDirection - averageRating: SortDirection - id: SortDirection - isActive: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related Actors match this filter""" - actors_ALL: ActorWhere - """Return Movies where none of the related Actors match this filter""" - actors_NONE: ActorWhere - """Return Movies where one of the related Actors match this filter""" - actors_SINGLE: ActorWhere - """Return Movies where some of the related Actors match this filter""" - actors_SOME: ActorWhere - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - isActive: Boolean -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type PersonMoviesConnection { - edges: [PersonMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonMoviesConnectionSort { - node: MovieSort -} - -input PersonMoviesConnectionWhere { - AND: [PersonMoviesConnectionWhere!] - NOT: PersonMoviesConnectionWhere - OR: [PersonMoviesConnectionWhere!] - node: MovieWhere -} - -type PersonMoviesRelationship { - cursor: String! - node: Movie! -} - -input PersonOptions { - limit: Int - offset: Int -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - """ - Return People where all of the related PersonMoviesConnections match this filter - """ - moviesConnection_ALL: PersonMoviesConnectionWhere - """ - Return People where none of the related PersonMoviesConnections match this filter - """ - moviesConnection_NONE: PersonMoviesConnectionWhere - """ - Return People where one of the related PersonMoviesConnections match this filter - """ - moviesConnection_SINGLE: PersonMoviesConnectionWhere - """ - Return People where some of the related PersonMoviesConnections match this filter - """ - moviesConnection_SOME: PersonMoviesConnectionWhere - """Return People where all of the related Movies match this filter""" - movies_ALL: MovieWhere - """Return People where none of the related Movies match this filter""" - movies_NONE: MovieWhere - """Return People where one of the related Movies match this filter""" - movies_SINGLE: MovieWhere - """Return People where some of the related Movies match this filter""" - movies_SOME: MovieWhere -} - -type Query { - actors(options: QueryOptions, where: ActorWhere): [Actor!]! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, where: PersonWhere): PeopleConnection! - stars(options: StarOptions, where: StarWhere): [Star!]! - starsConnection(after: String, first: Int, where: StarWhere): StarsConnection! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} - -type Star { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [StarMoviesConnectionSort!], where: StarMoviesConnectionWhere): StarMoviesConnection! -} - -type StarEdge { - cursor: String! - node: Star! -} - -type StarMoviesConnection { - edges: [StarMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input StarMoviesConnectionSort { - node: MovieSort -} - -input StarMoviesConnectionWhere { - AND: [StarMoviesConnectionWhere!] - NOT: StarMoviesConnectionWhere - OR: [StarMoviesConnectionWhere!] - node: MovieWhere -} - -type StarMoviesRelationship { - cursor: String! - node: Movie! -} - -input StarOptions { - limit: Int - offset: Int -} - -input StarWhere { - AND: [StarWhere!] - NOT: StarWhere - OR: [StarWhere!] - """ - Return Stars where all of the related StarMoviesConnections match this filter - """ - moviesConnection_ALL: StarMoviesConnectionWhere - """ - Return Stars where none of the related StarMoviesConnections match this filter - """ - moviesConnection_NONE: StarMoviesConnectionWhere - """ - Return Stars where one of the related StarMoviesConnections match this filter - """ - moviesConnection_SINGLE: StarMoviesConnectionWhere - """ - Return Stars where some of the related StarMoviesConnections match this filter - """ - moviesConnection_SOME: StarMoviesConnectionWhere - """Return Stars where all of the related Movies match this filter""" - movies_ALL: MovieWhere - """Return Stars where none of the related Movies match this filter""" - movies_NONE: MovieWhere - """Return Stars where one of the related Movies match this filter""" - movies_SINGLE: MovieWhere - """Return Stars where some of the related Movies match this filter""" - movies_SOME: MovieWhere -} - -type StarsConnection { - edges: [StarEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} ----- - -== Empty EventPayload type, but @relationshipProperty exists - -.Schema -[source,graphql,schema=true] ----- -type Movie { - id: ID - actorCount: Int - averageRating: Float - isActive: Boolean - actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) -} - -type ActedIn @relationshipProperties { - screenTime: Int! -} - -type Actor { - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -""" -The edge properties for the following fields: -* Movie.actors -""" -type ActedIn { - screenTime: Int! -} - -input ActedInSort { - screenTime: SortDirection -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorOptions { - limit: Int - offset: Int -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - """ - Return Actors where all of the related ActorMoviesConnections match this filter - """ - moviesConnection_ALL: ActorMoviesConnectionWhere - """ - Return Actors where none of the related ActorMoviesConnections match this filter - """ - moviesConnection_NONE: ActorMoviesConnectionWhere - """ - Return Actors where one of the related ActorMoviesConnections match this filter - """ - moviesConnection_SINGLE: ActorMoviesConnectionWhere - """ - Return Actors where some of the related ActorMoviesConnections match this filter - """ - moviesConnection_SOME: ActorMoviesConnectionWhere - """Return Actors where all of the related Movies match this filter""" - movies_ALL: MovieWhere - """Return Actors where none of the related Movies match this filter""" - movies_NONE: MovieWhere - """Return Actors where one of the related Movies match this filter""" - movies_SINGLE: MovieWhere - """Return Actors where some of the related Movies match this filter""" - movies_SOME: MovieWhere -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - actorCount: Int - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - averageRating: Float - id: ID - isActive: Boolean -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - edge: ActedInSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - edge: ActedInWhere - node: ActorWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! - properties: ActedIn! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - actorCount: SortDirection - averageRating: SortDirection - id: SortDirection - isActive: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - """ - Return Movies where all of the related MovieActorsConnections match this filter - """ - actorsConnection_ALL: MovieActorsConnectionWhere - """ - Return Movies where none of the related MovieActorsConnections match this filter - """ - actorsConnection_NONE: MovieActorsConnectionWhere - """ - Return Movies where one of the related MovieActorsConnections match this filter - """ - actorsConnection_SINGLE: MovieActorsConnectionWhere - """ - Return Movies where some of the related MovieActorsConnections match this filter - """ - actorsConnection_SOME: MovieActorsConnectionWhere - """Return Movies where all of the related Actors match this filter""" - actors_ALL: ActorWhere - """Return Movies where none of the related Actors match this filter""" - actors_NONE: ActorWhere - """Return Movies where one of the related Actors match this filter""" - actors_SINGLE: ActorWhere - """Return Movies where some of the related Actors match this filter""" - actors_SOME: ActorWhere - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - isActive: Boolean -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/extend.adoc b/core/src/test/resources/tck-test-files/schema/v2/extend.adoc index cade59fb..a781dd16 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/extend.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/extend.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID } @@ -49,8 +49,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -61,13 +61,6 @@ enum SortDirection { DESC } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -78,14 +71,16 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } diff --git a/core/src/test/resources/tck-test-files/schema/v2/extend.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/extend.js.adoc index 99df0b75..6742b2dc 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/extend.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/extend.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID } @@ -35,15 +35,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -56,14 +47,16 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -83,8 +76,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/inputs.adoc b/core/src/test/resources/tck-test-files/schema/v2/inputs.adoc index 89ec01db..7c0a72be 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/inputs.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/inputs.adoc @@ -12,7 +12,7 @@ input NodeInput { id: ID } -type Movie { +type Movie @node { id: ID } @@ -52,8 +52,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! name(input: NodeInput): String } @@ -65,13 +65,6 @@ enum SortDirection { DESC } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -81,9 +74,10 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } diff --git a/core/src/test/resources/tck-test-files/schema/v2/inputs.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/inputs.js.adoc index 11059244..d869c0c0 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/inputs.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/inputs.js.adoc @@ -13,7 +13,7 @@ input NodeInput { id: ID } -type Movie { +type Movie @node { id: ID } @@ -38,15 +38,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -58,9 +49,10 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -84,8 +76,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! name(input: NodeInput): String } diff --git a/core/src/test/resources/tck-test-files/schema/v2/interface-relationships.adoc b/core/src/test/resources/tck-test-files/schema/v2/interface-relationships.adoc index 0e16b389..624c8aa2 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/interface-relationships.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/interface-relationships.adoc @@ -12,12 +12,12 @@ interface Production { title: String! } -type Movie implements Production { +type Movie implements Production @node { title: String! runtime: Int! } -type Series implements Production { +type Series implements Production @node { title: String! episodes: Int! } @@ -26,7 +26,7 @@ type ActedIn @relationshipProperties { screenTime: Int! } -type Actor { +type Actor @node { name: String! actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } @@ -52,8 +52,8 @@ type ActedIn { } type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -116,14 +116,14 @@ type ProductionsConnection { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! + productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! + series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! + seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } type Series implements Production { @@ -163,7 +163,8 @@ input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - screenTime: Int + screenTime: Int @deprecated(reason : "Please use the explicit _EQ version") + screenTime_EQ: Int screenTime_GT: Int screenTime_GTE: Int screenTime_IN: [Int!] @@ -184,13 +185,6 @@ input ActorActedInConnectionWhere { node: ProductionWhere } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { name: SortDirection @@ -216,20 +210,14 @@ input ActorWhere { actedIn_SINGLE: ProductionWhere "Return Actors where some of the related Productions match this filter" actedIn_SOME: ProductionWhere - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { runtime: SortDirection @@ -240,26 +228,21 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - runtime: Int + runtime: Int @deprecated(reason : "Please use the explicit _EQ version") + runtime_EQ: Int runtime_GT: Int runtime_GTE: Int runtime_IN: [Int!] runtime_LT: Int runtime_LTE: Int - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } -input ProductionOptions { - limit: Int - offset: Int - "Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ProductionSort] -} - "Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object." input ProductionSort { title: SortDirection @@ -269,19 +252,13 @@ input ProductionWhere { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] -} - -input SeriesOptions { - limit: Int - offset: Int - "Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array." - sort: [SeriesSort!] + typename: [ProductionImplementation!] } "Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object." @@ -294,15 +271,17 @@ input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] - episodes: Int + episodes: Int @deprecated(reason : "Please use the explicit _EQ version") + episodes_EQ: Int episodes_GT: Int episodes_GTE: Int episodes_IN: [Int!] episodes_LT: Int episodes_LTE: Int - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } diff --git a/core/src/test/resources/tck-test-files/schema/v2/interface-relationships.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/interface-relationships.js.adoc index 2b07f1d3..9aae12d4 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/interface-relationships.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/interface-relationships.js.adoc @@ -13,12 +13,12 @@ interface Production { title: String! } -type Movie implements Production { +type Movie implements Production @node { title: String! runtime: Int! } -type Series implements Production { +type Series implements Production @node { title: String! episodes: Int! } @@ -27,7 +27,7 @@ type ActedIn @relationshipProperties { screenTime: Int! } -type Actor { +type Actor @node { name: String! actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } @@ -56,7 +56,8 @@ input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - screenTime: Int + screenTime: Int @deprecated(reason: "Please use the explicit _EQ version") + screenTime_EQ: Int screenTime_GT: Int screenTime_GTE: Int screenTime_IN: [Int!] @@ -65,8 +66,8 @@ input ActedInWhere { } type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -100,15 +101,6 @@ type ActorEdge { node: Actor! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -144,9 +136,10 @@ input ActorWhere { actedIn_SINGLE: ProductionWhere """Return Actors where some of the related Productions match this filter""" actedIn_SOME: ProductionWhere - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } @@ -167,15 +160,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -188,15 +172,17 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - runtime: Int + runtime: Int @deprecated(reason: "Please use the explicit _EQ version") + runtime_EQ: Int runtime_GT: Int runtime_GTE: Int runtime_IN: [Int!] runtime_LT: Int runtime_LTE: Int - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } @@ -229,15 +215,6 @@ enum ProductionImplementation { Series } -input ProductionOptions { - limit: Int - offset: Int - """ - Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ProductionSort] -} - """ Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. """ @@ -249,12 +226,13 @@ input ProductionWhere { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] } type ProductionsConnection { @@ -264,14 +242,14 @@ type ProductionsConnection { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! + productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! + series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! + seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } type Series implements Production { @@ -290,15 +268,6 @@ type SeriesEdge { node: Series! } -input SeriesOptions { - limit: Int - offset: Int - """ - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [SeriesSort!] -} - """ Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. """ @@ -311,15 +280,17 @@ input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] - episodes: Int + episodes: Int @deprecated(reason: "Please use the explicit _EQ version") + episodes_EQ: Int episodes_GT: Int episodes_GTE: Int episodes_IN: [Int!] episodes_LT: Int episodes_LTE: Int - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } diff --git a/core/src/test/resources/tck-test-files/schema/v2/issues/1038.adoc b/core/src/test/resources/tck-test-files/schema/v2/issues/1038.adoc index 8bdbded0..63b50cbd 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/issues/1038.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/issues/1038.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type AWSAccount { +type AWSAccount @node { code: String accountName: String } -type DNSZone { +type DNSZone @node { awsId: String zoneType: String } @@ -67,10 +67,10 @@ type PageInfo { } type Query { - awsAccounts(options: AWSAccountOptions, where: AWSAccountWhere): [AWSAccount!]! - awsAccountsConnection(after: String, first: Int, sort: [AWSAccountSort], where: AWSAccountWhere): AwsAccountsConnection! - dnsZones(options: DNSZoneOptions, where: DNSZoneWhere): [DNSZone!]! - dnsZonesConnection(after: String, first: Int, sort: [DNSZoneSort], where: DNSZoneWhere): DnsZonesConnection! + awsAccounts(limit: Int, offset: Int, sort: [AWSAccountSort!], where: AWSAccountWhere): [AWSAccount!]! + awsAccountsConnection(after: String, first: Int, sort: [AWSAccountSort!], where: AWSAccountWhere): AwsAccountsConnection! + dnsZones(limit: Int, offset: Int, sort: [DNSZoneSort!], where: DNSZoneWhere): [DNSZone!]! + dnsZonesConnection(after: String, first: Int, sort: [DNSZoneSort!], where: DNSZoneWhere): DnsZonesConnection! } "An enum for sorting in either ascending or descending order." @@ -81,13 +81,6 @@ enum SortDirection { DESC } -input AWSAccountOptions { - limit: Int - offset: Int - "Specify one or more AWSAccountSort objects to sort AwsAccounts by. The sorts will be applied in the order in which they are arranged in the array." - sort: [AWSAccountSort!] -} - "Fields to sort AwsAccounts by. The order in which sorts are applied is not guaranteed when specifying many fields in one AWSAccountSort object." input AWSAccountSort { accountName: SortDirection @@ -98,25 +91,20 @@ input AWSAccountWhere { AND: [AWSAccountWhere!] NOT: AWSAccountWhere OR: [AWSAccountWhere!] - accountName: String + accountName: String @deprecated(reason : "Please use the explicit _EQ version") accountName_CONTAINS: String accountName_ENDS_WITH: String + accountName_EQ: String accountName_IN: [String] accountName_STARTS_WITH: String - code: String + code: String @deprecated(reason : "Please use the explicit _EQ version") code_CONTAINS: String code_ENDS_WITH: String + code_EQ: String code_IN: [String] code_STARTS_WITH: String } -input DNSZoneOptions { - limit: Int - offset: Int - "Specify one or more DNSZoneSort objects to sort DnsZones by. The sorts will be applied in the order in which they are arranged in the array." - sort: [DNSZoneSort!] -} - "Fields to sort DnsZones by. The order in which sorts are applied is not guaranteed when specifying many fields in one DNSZoneSort object." input DNSZoneSort { awsId: SortDirection @@ -127,14 +115,16 @@ input DNSZoneWhere { AND: [DNSZoneWhere!] NOT: DNSZoneWhere OR: [DNSZoneWhere!] - awsId: String + awsId: String @deprecated(reason : "Please use the explicit _EQ version") awsId_CONTAINS: String awsId_ENDS_WITH: String + awsId_EQ: String awsId_IN: [String] awsId_STARTS_WITH: String - zoneType: String + zoneType: String @deprecated(reason : "Please use the explicit _EQ version") zoneType_CONTAINS: String zoneType_ENDS_WITH: String + zoneType_EQ: String zoneType_IN: [String] zoneType_STARTS_WITH: String } diff --git a/core/src/test/resources/tck-test-files/schema/v2/issues/1038.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/issues/1038.js.adoc index 6ef8044c..18ab31cc 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/issues/1038.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/issues/1038.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type AWSAccount { +type AWSAccount @node { code: String accountName: String } -type DNSZone { +type DNSZone @node { awsId: String zoneType: String } @@ -37,15 +37,6 @@ type AWSAccountEdge { node: AWSAccount! } -input AWSAccountOptions { - limit: Int - offset: Int - """ - Specify one or more AWSAccountSort objects to sort AwsAccounts by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [AWSAccountSort!] -} - """ Fields to sort AwsAccounts by. The order in which sorts are applied is not guaranteed when specifying many fields in one AWSAccountSort object. """ @@ -58,14 +49,16 @@ input AWSAccountWhere { AND: [AWSAccountWhere!] NOT: AWSAccountWhere OR: [AWSAccountWhere!] - accountName: String + accountName: String @deprecated(reason: "Please use the explicit _EQ version") accountName_CONTAINS: String accountName_ENDS_WITH: String + accountName_EQ: String accountName_IN: [String] accountName_STARTS_WITH: String - code: String + code: String @deprecated(reason: "Please use the explicit _EQ version") code_CONTAINS: String code_ENDS_WITH: String + code_EQ: String code_IN: [String] code_STARTS_WITH: String } @@ -86,15 +79,6 @@ type DNSZoneEdge { node: DNSZone! } -input DNSZoneOptions { - limit: Int - offset: Int - """ - Specify one or more DNSZoneSort objects to sort DnsZones by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [DNSZoneSort!] -} - """ Fields to sort DnsZones by. The order in which sorts are applied is not guaranteed when specifying many fields in one DNSZoneSort object. """ @@ -107,14 +91,16 @@ input DNSZoneWhere { AND: [DNSZoneWhere!] NOT: DNSZoneWhere OR: [DNSZoneWhere!] - awsId: String + awsId: String @deprecated(reason: "Please use the explicit _EQ version") awsId_CONTAINS: String awsId_ENDS_WITH: String + awsId_EQ: String awsId_IN: [String] awsId_STARTS_WITH: String - zoneType: String + zoneType: String @deprecated(reason: "Please use the explicit _EQ version") zoneType_CONTAINS: String zoneType_ENDS_WITH: String + zoneType_EQ: String zoneType_IN: [String] zoneType_STARTS_WITH: String } @@ -134,10 +120,10 @@ type PageInfo { } type Query { - awsAccounts(options: AWSAccountOptions, where: AWSAccountWhere): [AWSAccount!]! - awsAccountsConnection(after: String, first: Int, sort: [AWSAccountSort], where: AWSAccountWhere): AwsAccountsConnection! - dnsZones(options: DNSZoneOptions, where: DNSZoneWhere): [DNSZone!]! - dnsZonesConnection(after: String, first: Int, sort: [DNSZoneSort], where: DNSZoneWhere): DnsZonesConnection! + awsAccounts(limit: Int, offset: Int, sort: [AWSAccountSort!], where: AWSAccountWhere): [AWSAccount!]! + awsAccountsConnection(after: String, first: Int, sort: [AWSAccountSort!], where: AWSAccountWhere): AwsAccountsConnection! + dnsZones(limit: Int, offset: Int, sort: [DNSZoneSort!], where: DNSZoneWhere): [DNSZone!]! + dnsZonesConnection(after: String, first: Int, sort: [DNSZoneSort!], where: DNSZoneWhere): DnsZonesConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/issues/1575.adoc b/core/src/test/resources/tck-test-files/schema/v2/issues/1575.adoc new file mode 100644 index 00000000..44c24484 --- /dev/null +++ b/core/src/test/resources/tck-test-files/schema/v2/issues/1575.adoc @@ -0,0 +1,143 @@ +:toc: +:toclevels: 42 + += https://github.com/neo4j/graphql/issues/1575 + +== Properties with same alias value + +.Schema +[source,graphql,schema=true] +---- +type Foo @node { + point: Point + geo_point: Point @alias(property: "point") +} +---- + +.Augmented Schema +[source,graphql,augmented=true] +---- +schema { + query: Query +} + +type Foo { + geo_point: Point + point: Point +} + +type FooEdge { + cursor: String! + node: Foo! +} + +type FoosConnection { + edges: [FooEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +"Pagination information (Relay)" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +"A point in a coordinate system." +type Point { + """ + The coordinate reference systems (CRS) + ------------------------------------- + possible values: + * `wgs-84`: A 2D geographic point in the WGS 84 CRS is specified by: longitude and latitude + * `wgs-84-3d`: A 3D geographic point in the WGS 84 CRS is specified by longitude, latitude and height + """ + crs: String! + "The third element of the Coordinate for geographic CRS, meters above the ellipsoid defined by the datum (WGS-84)" + height: Float + """ + The second element of the Coordinate for geographic CRS, degrees North of the equator + Range -90.0 to 90.0 + """ + latitude: Float! + """ + The first element of the Coordinate for geographic CRS, degrees East of the prime meridian + Range -180.0 to 180.0 + """ + longitude: Float! + """ + The internal Neo4j ID for the CRS + One of: + * `4326`: represents CRS `wgs-84` + * `4979`: represents CRS `wgs-84-3d` + """ + srid: Int! +} + +type Query { + foos(limit: Int, offset: Int, sort: [FooSort!], where: FooWhere): [Foo!]! + foosConnection(after: String, first: Int, sort: [FooSort!], where: FooWhere): FoosConnection! +} + +"An enum for sorting in either ascending or descending order." +enum SortDirection { + "Sort by field values in ascending order." + ASC + "Sort by field values in descending order." + DESC +} + +"Fields to sort Foos by. The order in which sorts are applied is not guaranteed when specifying many fields in one FooSort object." +input FooSort { + geo_point: SortDirection + point: SortDirection +} + +input FooWhere { + AND: [FooWhere!] + NOT: FooWhere + OR: [FooWhere!] + geo_point: PointInput @deprecated(reason : "Please use the explicit _EQ version") + geo_point_DISTANCE: PointDistance + geo_point_EQ: PointInput + geo_point_GT: PointDistance + geo_point_GTE: PointDistance + geo_point_IN: [PointInput] + geo_point_LT: PointDistance + geo_point_LTE: PointDistance + point: PointInput @deprecated(reason : "Please use the explicit _EQ version") + point_DISTANCE: PointDistance + point_EQ: PointInput + point_GT: PointDistance + point_GTE: PointDistance + point_IN: [PointInput] + point_LT: PointDistance + point_LTE: PointDistance +} + +"Input type for a point with a distance" +input PointDistance { + "The distance in metres to be used when comparing two points" + distance: Float! + point: PointInput! +} + +"Input type for a point" +input PointInput { + "The third element of the Coordinate for geographic CRS, meters above the ellipsoid defined by the datum (WGS-84)" + height: Float + """ + The second element of the Coordinate for geographic CRS, degrees North of the equator + Range -90.0 to 90.0 + """ + latitude: Float! + """ + The first element of the Coordinate for geographic CRS, degrees East of the prime meridian + Range -180.0 to 180.0 + """ + longitude: Float! +} + +---- diff --git a/core/src/test/resources/tck-test-files/schema/v2/issues/1575.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/issues/1575.js.adoc new file mode 100644 index 00000000..679cd441 --- /dev/null +++ b/core/src/test/resources/tck-test-files/schema/v2/issues/1575.js.adoc @@ -0,0 +1,149 @@ +// This file was generated by the Test-Case extractor of neo4j-graphql +:toc: +:toclevels: 42 + += https://github.com/neo4j/graphql/issues/1575 + +== Properties with same alias value + +.Schema +[source,graphql,schema=true] +---- +type Foo @node { + point: Point + geo_point: Point @alias(property: "point") +} +---- + +.Augmented Schema +[source,graphql,augmented=true] +---- +schema { + query: Query +} + +type Foo { + geo_point: Point + point: Point +} + +type FooEdge { + cursor: String! + node: Foo! +} + +""" +Fields to sort Foos by. The order in which sorts are applied is not guaranteed when specifying many fields in one FooSort object. +""" +input FooSort { + geo_point: SortDirection + point: SortDirection +} + +input FooWhere { + AND: [FooWhere!] + NOT: FooWhere + OR: [FooWhere!] + geo_point: PointInput @deprecated(reason: "Please use the explicit _EQ version") + geo_point_DISTANCE: PointDistance + geo_point_EQ: PointInput + geo_point_GT: PointDistance + geo_point_GTE: PointDistance + geo_point_IN: [PointInput] + geo_point_LT: PointDistance + geo_point_LTE: PointDistance + point: PointInput @deprecated(reason: "Please use the explicit _EQ version") + point_DISTANCE: PointDistance + point_EQ: PointInput + point_GT: PointDistance + point_GTE: PointDistance + point_IN: [PointInput] + point_LT: PointDistance + point_LTE: PointDistance +} + +type FoosConnection { + edges: [FooEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +"""Pagination information (Relay)""" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +"""A point in a coordinate system.""" +type Point { + """ + The coordinate reference systems (CRS) + ------------------------------------- + possible values: + * `wgs-84`: A 2D geographic point in the WGS 84 CRS is specified by: longitude and latitude + * `wgs-84-3d`: A 3D geographic point in the WGS 84 CRS is specified by longitude, latitude and height + """ + crs: String! + """ + The third element of the Coordinate for geographic CRS, meters above the ellipsoid defined by the datum (WGS-84) + """ + height: Float + """ + The second element of the Coordinate for geographic CRS, degrees North of the equator + Range -90.0 to 90.0 + """ + latitude: Float! + """ + The first element of the Coordinate for geographic CRS, degrees East of the prime meridian + Range -180.0 to 180.0 + """ + longitude: Float! + """ + The internal Neo4j ID for the CRS + One of: + * `4326`: represents CRS `wgs-84` + * `4979`: represents CRS `wgs-84-3d` + """ + srid: Int! +} + +"""Input type for a point with a distance""" +input PointDistance { + """The distance in metres to be used when comparing two points""" + distance: Float! + point: PointInput! +} + +"""Input type for a point""" +input PointInput { + """ + The third element of the Coordinate for geographic CRS, meters above the ellipsoid defined by the datum (WGS-84) + """ + height: Float + """ + The second element of the Coordinate for geographic CRS, degrees North of the equator + Range -90.0 to 90.0 + """ + latitude: Float! + """ + The first element of the Coordinate for geographic CRS, degrees East of the prime meridian + Range -180.0 to 180.0 + """ + longitude: Float! +} + +type Query { + foos(limit: Int, offset: Int, sort: [FooSort!], where: FooWhere): [Foo!]! + foosConnection(after: String, first: Int, sort: [FooSort!], where: FooWhere): FoosConnection! +} + +"""An enum for sorting in either ascending or descending order.""" +enum SortDirection { + """Sort by field values in ascending order.""" + ASC + """Sort by field values in descending order.""" + DESC +} +---- diff --git a/core/src/test/resources/tck-test-files/schema/v2/issues/1614.adoc b/core/src/test/resources/tck-test-files/schema/v2/issues/1614.adoc index 49cefd7c..61031224 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/issues/1614.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/issues/1614.adoc @@ -18,11 +18,11 @@ type CrewPosition @relationshipProperties { position: CrewPositionType } -type Movie { +type Movie @node { name: String! } -type CrewMember { +type CrewMember @node { movies: Movie! @relationship(type: "WORKED_ON", direction: OUT, properties: "CrewPosition") } ---- @@ -35,8 +35,8 @@ schema { } type CrewMember { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): Movie! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [CrewMemberMoviesConnectionSort!], where: CrewMemberMoviesConnectionWhere): CrewMemberMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): Movie! + moviesConnection(after: String, first: Int, sort: [CrewMemberMoviesConnectionSort!], where: CrewMemberMoviesConnectionWhere): CrewMemberMoviesConnection! } type CrewMemberEdge { @@ -94,10 +94,10 @@ type PageInfo { } type Query { - crewMembers(options: CrewMemberOptions, where: CrewMemberWhere): [CrewMember!]! + crewMembers(limit: Int, offset: Int, where: CrewMemberWhere): [CrewMember!]! crewMembersConnection(after: String, first: Int, where: CrewMemberWhere): CrewMembersConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } enum CrewPositionType { @@ -127,19 +127,12 @@ input CrewMemberMoviesConnectionWhere { node: MovieWhere } -input CrewMemberOptions { - limit: Int - offset: Int -} - input CrewMemberWhere { AND: [CrewMemberWhere!] NOT: CrewMemberWhere OR: [CrewMemberWhere!] movies: MovieWhere moviesConnection: CrewMemberMoviesConnectionWhere - moviesConnection_NOT: CrewMemberMoviesConnectionWhere - movies_NOT: MovieWhere } input CrewPositionSort { @@ -150,17 +143,11 @@ input CrewPositionWhere { AND: [CrewPositionWhere!] NOT: CrewPositionWhere OR: [CrewPositionWhere!] - position: CrewPositionType + position: CrewPositionType @deprecated(reason : "Please use the explicit _EQ version") + position_EQ: CrewPositionType position_IN: [CrewPositionType] } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { name: SortDirection @@ -170,9 +157,10 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } diff --git a/core/src/test/resources/tck-test-files/schema/v2/issues/1614.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/issues/1614.js.adoc index b9a06a78..20b0a4f3 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/issues/1614.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/issues/1614.js.adoc @@ -19,11 +19,11 @@ type CrewPosition @relationshipProperties { position: CrewPositionType } -type Movie { +type Movie @node { name: String! } -type CrewMember { +type CrewMember @node { movies: Movie! @relationship(type: "WORKED_ON", direction: OUT, properties: "CrewPosition") } ---- @@ -36,8 +36,8 @@ schema { } type CrewMember { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): Movie! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [CrewMemberMoviesConnectionSort!], where: CrewMemberMoviesConnectionWhere): CrewMemberMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): Movie! + moviesConnection(after: String, first: Int, sort: [CrewMemberMoviesConnectionSort!], where: CrewMemberMoviesConnectionWhere): CrewMemberMoviesConnection! } type CrewMemberEdge { @@ -70,19 +70,12 @@ type CrewMemberMoviesRelationship { properties: CrewPosition! } -input CrewMemberOptions { - limit: Int - offset: Int -} - input CrewMemberWhere { AND: [CrewMemberWhere!] NOT: CrewMemberWhere OR: [CrewMemberWhere!] movies: MovieWhere moviesConnection: CrewMemberMoviesConnectionWhere - moviesConnection_NOT: CrewMemberMoviesConnectionWhere - movies_NOT: MovieWhere } type CrewMembersConnection { @@ -113,7 +106,8 @@ input CrewPositionWhere { AND: [CrewPositionWhere!] NOT: CrewPositionWhere OR: [CrewPositionWhere!] - position: CrewPositionType + position: CrewPositionType @deprecated(reason: "Please use the explicit _EQ version") + position_EQ: CrewPositionType position_IN: [CrewPositionType] } @@ -126,15 +120,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -146,9 +131,10 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } @@ -168,10 +154,10 @@ type PageInfo { } type Query { - crewMembers(options: CrewMemberOptions, where: CrewMemberWhere): [CrewMember!]! + crewMembers(limit: Int, offset: Int, where: CrewMemberWhere): [CrewMember!]! crewMembersConnection(after: String, first: Int, where: CrewMemberWhere): CrewMembersConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/issues/162.adoc b/core/src/test/resources/tck-test-files/schema/v2/issues/162.adoc index 3db789ac..1cc73111 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/issues/162.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/issues/162.adoc @@ -8,16 +8,16 @@ .Schema [source,graphql,schema=true] ---- -type Tiger { +type Tiger @node { x: Int } -type TigerJawLevel2 { +type TigerJawLevel2 @node { id: ID part1: TigerJawLevel2Part1! @relationship(type: "REL1", direction: OUT) } -type TigerJawLevel2Part1 { +type TigerJawLevel2Part1 @node { id: ID tiger: Tiger! @relationship(type: "REL2", direction: OUT) } @@ -39,12 +39,12 @@ type PageInfo { } type Query { - tigerJawLevel2Part1s(options: TigerJawLevel2Part1Options, where: TigerJawLevel2Part1Where): [TigerJawLevel2Part1!]! - tigerJawLevel2Part1sConnection(after: String, first: Int, sort: [TigerJawLevel2Part1Sort], where: TigerJawLevel2Part1Where): TigerJawLevel2Part1sConnection! - tigerJawLevel2s(options: TigerJawLevel2Options, where: TigerJawLevel2Where): [TigerJawLevel2!]! - tigerJawLevel2sConnection(after: String, first: Int, sort: [TigerJawLevel2Sort], where: TigerJawLevel2Where): TigerJawLevel2sConnection! - tigers(options: TigerOptions, where: TigerWhere): [Tiger!]! - tigersConnection(after: String, first: Int, sort: [TigerSort], where: TigerWhere): TigersConnection! + tigerJawLevel2Part1s(limit: Int, offset: Int, sort: [TigerJawLevel2Part1Sort!], where: TigerJawLevel2Part1Where): [TigerJawLevel2Part1!]! + tigerJawLevel2Part1sConnection(after: String, first: Int, sort: [TigerJawLevel2Part1Sort!], where: TigerJawLevel2Part1Where): TigerJawLevel2Part1sConnection! + tigerJawLevel2s(limit: Int, offset: Int, sort: [TigerJawLevel2Sort!], where: TigerJawLevel2Where): [TigerJawLevel2!]! + tigerJawLevel2sConnection(after: String, first: Int, sort: [TigerJawLevel2Sort!], where: TigerJawLevel2Where): TigerJawLevel2sConnection! + tigers(limit: Int, offset: Int, sort: [TigerSort!], where: TigerWhere): [Tiger!]! + tigersConnection(after: String, first: Int, sort: [TigerSort!], where: TigerWhere): TigersConnection! } type Tiger { @@ -58,8 +58,8 @@ type TigerEdge { type TigerJawLevel2 { id: ID - part1(directed: Boolean = true, options: TigerJawLevel2Part1Options, where: TigerJawLevel2Part1Where): TigerJawLevel2Part1! - part1Connection(after: String, directed: Boolean = true, first: Int, sort: [TigerJawLevel2Part1ConnectionSort!], where: TigerJawLevel2Part1ConnectionWhere): TigerJawLevel2Part1Connection! + part1(limit: Int, offset: Int, sort: [TigerJawLevel2Part1Sort!], where: TigerJawLevel2Part1Where): TigerJawLevel2Part1! + part1Connection(after: String, first: Int, sort: [TigerJawLevel2Part1ConnectionSort!], where: TigerJawLevel2Part1ConnectionWhere): TigerJawLevel2Part1Connection! } type TigerJawLevel2Edge { @@ -69,8 +69,8 @@ type TigerJawLevel2Edge { type TigerJawLevel2Part1 { id: ID - tiger(directed: Boolean = true, options: TigerOptions, where: TigerWhere): Tiger! - tigerConnection(after: String, directed: Boolean = true, first: Int, sort: [TigerJawLevel2Part1TigerConnectionSort!], where: TigerJawLevel2Part1TigerConnectionWhere): TigerJawLevel2Part1TigerConnection! + tiger(limit: Int, offset: Int, sort: [TigerSort!], where: TigerWhere): Tiger! + tigerConnection(after: String, first: Int, sort: [TigerJawLevel2Part1TigerConnectionSort!], where: TigerJawLevel2Part1TigerConnectionWhere): TigerJawLevel2Part1TigerConnection! } type TigerJawLevel2Part1Connection { @@ -126,13 +126,6 @@ enum SortDirection { DESC } -input TigerJawLevel2Options { - limit: Int - offset: Int - "Specify one or more TigerJawLevel2Sort objects to sort TigerJawLevel2s by. The sorts will be applied in the order in which they are arranged in the array." - sort: [TigerJawLevel2Sort!] -} - input TigerJawLevel2Part1ConnectionSort { node: TigerJawLevel2Part1Sort } @@ -144,13 +137,6 @@ input TigerJawLevel2Part1ConnectionWhere { node: TigerJawLevel2Part1Where } -input TigerJawLevel2Part1Options { - limit: Int - offset: Int - "Specify one or more TigerJawLevel2Part1Sort objects to sort TigerJawLevel2Part1s by. The sorts will be applied in the order in which they are arranged in the array." - sort: [TigerJawLevel2Part1Sort!] -} - "Fields to sort TigerJawLevel2Part1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one TigerJawLevel2Part1Sort object." input TigerJawLevel2Part1Sort { id: SortDirection @@ -171,15 +157,14 @@ input TigerJawLevel2Part1Where { AND: [TigerJawLevel2Part1Where!] NOT: TigerJawLevel2Part1Where OR: [TigerJawLevel2Part1Where!] - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID tiger: TigerWhere tigerConnection: TigerJawLevel2Part1TigerConnectionWhere - tigerConnection_NOT: TigerJawLevel2Part1TigerConnectionWhere - tiger_NOT: TigerWhere } "Fields to sort TigerJawLevel2s by. The order in which sorts are applied is not guaranteed when specifying many fields in one TigerJawLevel2Sort object." @@ -191,22 +176,14 @@ input TigerJawLevel2Where { AND: [TigerJawLevel2Where!] NOT: TigerJawLevel2Where OR: [TigerJawLevel2Where!] - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID part1: TigerJawLevel2Part1Where part1Connection: TigerJawLevel2Part1ConnectionWhere - part1Connection_NOT: TigerJawLevel2Part1ConnectionWhere - part1_NOT: TigerJawLevel2Part1Where -} - -input TigerOptions { - limit: Int - offset: Int - "Specify one or more TigerSort objects to sort Tigers by. The sorts will be applied in the order in which they are arranged in the array." - sort: [TigerSort!] } "Fields to sort Tigers by. The order in which sorts are applied is not guaranteed when specifying many fields in one TigerSort object." @@ -218,7 +195,8 @@ input TigerWhere { AND: [TigerWhere!] NOT: TigerWhere OR: [TigerWhere!] - x: Int + x: Int @deprecated(reason : "Please use the explicit _EQ version") + x_EQ: Int x_GT: Int x_GTE: Int x_IN: [Int] diff --git a/core/src/test/resources/tck-test-files/schema/v2/issues/162.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/issues/162.js.adoc index 457c31f8..77d6728c 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/issues/162.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/issues/162.js.adoc @@ -9,16 +9,16 @@ .Schema [source,graphql,schema=true] ---- -type Tiger { +type Tiger @node { x: Int } -type TigerJawLevel2 { +type TigerJawLevel2 @node { id: ID part1: TigerJawLevel2Part1! @relationship(type: "REL1", direction: OUT) } -type TigerJawLevel2Part1 { +type TigerJawLevel2Part1 @node { id: ID tiger: Tiger! @relationship(type: "REL2", direction: OUT) } @@ -40,12 +40,12 @@ type PageInfo { } type Query { - tigerJawLevel2Part1s(options: TigerJawLevel2Part1Options, where: TigerJawLevel2Part1Where): [TigerJawLevel2Part1!]! - tigerJawLevel2Part1sConnection(after: String, first: Int, sort: [TigerJawLevel2Part1Sort], where: TigerJawLevel2Part1Where): TigerJawLevel2Part1sConnection! - tigerJawLevel2s(options: TigerJawLevel2Options, where: TigerJawLevel2Where): [TigerJawLevel2!]! - tigerJawLevel2sConnection(after: String, first: Int, sort: [TigerJawLevel2Sort], where: TigerJawLevel2Where): TigerJawLevel2sConnection! - tigers(options: TigerOptions, where: TigerWhere): [Tiger!]! - tigersConnection(after: String, first: Int, sort: [TigerSort], where: TigerWhere): TigersConnection! + tigerJawLevel2Part1s(limit: Int, offset: Int, sort: [TigerJawLevel2Part1Sort!], where: TigerJawLevel2Part1Where): [TigerJawLevel2Part1!]! + tigerJawLevel2Part1sConnection(after: String, first: Int, sort: [TigerJawLevel2Part1Sort!], where: TigerJawLevel2Part1Where): TigerJawLevel2Part1sConnection! + tigerJawLevel2s(limit: Int, offset: Int, sort: [TigerJawLevel2Sort!], where: TigerJawLevel2Where): [TigerJawLevel2!]! + tigerJawLevel2sConnection(after: String, first: Int, sort: [TigerJawLevel2Sort!], where: TigerJawLevel2Where): TigerJawLevel2sConnection! + tigers(limit: Int, offset: Int, sort: [TigerSort!], where: TigerWhere): [Tiger!]! + tigersConnection(after: String, first: Int, sort: [TigerSort!], where: TigerWhere): TigersConnection! } """An enum for sorting in either ascending or descending order.""" @@ -67,8 +67,8 @@ type TigerEdge { type TigerJawLevel2 { id: ID - part1(directed: Boolean = true, options: TigerJawLevel2Part1Options, where: TigerJawLevel2Part1Where): TigerJawLevel2Part1! - part1Connection(after: String, directed: Boolean = true, first: Int, sort: [TigerJawLevel2Part1ConnectionSort!], where: TigerJawLevel2Part1ConnectionWhere): TigerJawLevel2Part1Connection! + part1(limit: Int, offset: Int, sort: [TigerJawLevel2Part1Sort!], where: TigerJawLevel2Part1Where): TigerJawLevel2Part1! + part1Connection(after: String, first: Int, sort: [TigerJawLevel2Part1ConnectionSort!], where: TigerJawLevel2Part1ConnectionWhere): TigerJawLevel2Part1Connection! } type TigerJawLevel2Edge { @@ -76,19 +76,10 @@ type TigerJawLevel2Edge { node: TigerJawLevel2! } -input TigerJawLevel2Options { - limit: Int - offset: Int - """ - Specify one or more TigerJawLevel2Sort objects to sort TigerJawLevel2s by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [TigerJawLevel2Sort!] -} - type TigerJawLevel2Part1 { id: ID - tiger(directed: Boolean = true, options: TigerOptions, where: TigerWhere): Tiger! - tigerConnection(after: String, directed: Boolean = true, first: Int, sort: [TigerJawLevel2Part1TigerConnectionSort!], where: TigerJawLevel2Part1TigerConnectionWhere): TigerJawLevel2Part1TigerConnection! + tiger(limit: Int, offset: Int, sort: [TigerSort!], where: TigerWhere): Tiger! + tigerConnection(after: String, first: Int, sort: [TigerJawLevel2Part1TigerConnectionSort!], where: TigerJawLevel2Part1TigerConnectionWhere): TigerJawLevel2Part1TigerConnection! } type TigerJawLevel2Part1Connection { @@ -113,15 +104,6 @@ type TigerJawLevel2Part1Edge { node: TigerJawLevel2Part1! } -input TigerJawLevel2Part1Options { - limit: Int - offset: Int - """ - Specify one or more TigerJawLevel2Part1Sort objects to sort TigerJawLevel2Part1s by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [TigerJawLevel2Part1Sort!] -} - type TigerJawLevel2Part1Relationship { cursor: String! node: TigerJawLevel2Part1! @@ -160,15 +142,14 @@ input TigerJawLevel2Part1Where { AND: [TigerJawLevel2Part1Where!] NOT: TigerJawLevel2Part1Where OR: [TigerJawLevel2Part1Where!] - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID tiger: TigerWhere tigerConnection: TigerJawLevel2Part1TigerConnectionWhere - tigerConnection_NOT: TigerJawLevel2Part1TigerConnectionWhere - tiger_NOT: TigerWhere } type TigerJawLevel2Part1sConnection { @@ -188,15 +169,14 @@ input TigerJawLevel2Where { AND: [TigerJawLevel2Where!] NOT: TigerJawLevel2Where OR: [TigerJawLevel2Where!] - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID part1: TigerJawLevel2Part1Where part1Connection: TigerJawLevel2Part1ConnectionWhere - part1Connection_NOT: TigerJawLevel2Part1ConnectionWhere - part1_NOT: TigerJawLevel2Part1Where } type TigerJawLevel2sConnection { @@ -205,15 +185,6 @@ type TigerJawLevel2sConnection { totalCount: Int! } -input TigerOptions { - limit: Int - offset: Int - """ - Specify one or more TigerSort objects to sort Tigers by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [TigerSort!] -} - """ Fields to sort Tigers by. The order in which sorts are applied is not guaranteed when specifying many fields in one TigerSort object. """ @@ -225,7 +196,8 @@ input TigerWhere { AND: [TigerWhere!] NOT: TigerWhere OR: [TigerWhere!] - x: Int + x: Int @deprecated(reason: "Please use the explicit _EQ version") + x_EQ: Int x_GT: Int x_GTE: Int x_IN: [Int] diff --git a/core/src/test/resources/tck-test-files/schema/v2/issues/2187.adoc b/core/src/test/resources/tck-test-files/schema/v2/issues/2187.adoc index d9111ab5..f26d5d4e 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/issues/2187.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/issues/2187.adoc @@ -8,14 +8,14 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String @deprecated(reason: "Do not use title") year: Int imdbRating: Float genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT) @deprecated(reason: "Do not use genre") } -type Genre { +type Genre @node { name: String movies: [Movie!]! @relationship(type: "IN_GENRE", direction: IN) } @@ -29,8 +29,8 @@ schema { } type Genre { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! name: String } @@ -57,8 +57,8 @@ type GenresConnection { } type Movie { - genres(directed: Boolean = true, options: GenreOptions, where: GenreWhere): [Genre!]! @deprecated(reason : "Do not use genre") - genresConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! @deprecated(reason : "Do not use genre") + genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! @deprecated(reason : "Do not use genre") + genresConnection(after: String, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! @deprecated(reason : "Do not use genre") imdbRating: Float title: String @deprecated(reason : "Do not use title") year: Int @@ -95,10 +95,10 @@ type PageInfo { } type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! + genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -120,13 +120,6 @@ input GenreMoviesConnectionWhere { node: MovieWhere } -input GenreOptions { - limit: Int - offset: Int - "Specify one or more GenreSort objects to sort Genres by. The sorts will be applied in the order in which they are arranged in the array." - sort: [GenreSort!] -} - "Fields to sort Genres by. The order in which sorts are applied is not guaranteed when specifying many fields in one GenreSort object." input GenreSort { name: SortDirection @@ -152,9 +145,10 @@ input GenreWhere { movies_SINGLE: MovieWhere "Return Genres where some of the related Movies match this filter" movies_SOME: MovieWhere - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -170,13 +164,6 @@ input MovieGenresConnectionWhere { node: GenreWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { imdbRating: SortDirection @@ -204,7 +191,8 @@ input MovieWhere { genres_SINGLE: GenreWhere @deprecated(reason : "Do not use genre") "Return Movies where some of the related Genres match this filter" genres_SOME: GenreWhere @deprecated(reason : "Do not use genre") - imdbRating: Float + imdbRating: Float @deprecated(reason : "Please use the explicit _EQ version") + imdbRating_EQ: Float imdbRating_GT: Float imdbRating_GTE: Float imdbRating_IN: [Float] @@ -213,9 +201,11 @@ input MovieWhere { title: String @deprecated(reason : "Do not use title") title_CONTAINS: String @deprecated(reason : "Do not use title") title_ENDS_WITH: String @deprecated(reason : "Do not use title") + title_EQ: String @deprecated(reason : "Do not use title") title_IN: [String] @deprecated(reason : "Do not use title") title_STARTS_WITH: String @deprecated(reason : "Do not use title") - year: Int + year: Int @deprecated(reason : "Please use the explicit _EQ version") + year_EQ: Int year_GT: Int year_GTE: Int year_IN: [Int] diff --git a/core/src/test/resources/tck-test-files/schema/v2/issues/2187.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/issues/2187.js.adoc index 30e6b2f7..2115052e 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/issues/2187.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/issues/2187.js.adoc @@ -9,14 +9,14 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String @deprecated(reason: "Do not use title") year: Int imdbRating: Float genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT) @deprecated(reason: "Do not use genre") } -type Genre { +type Genre @node { name: String movies: [Movie!]! @relationship(type: "IN_GENRE", direction: IN) } @@ -30,8 +30,8 @@ schema { } type Genre { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! name: String } @@ -62,15 +62,6 @@ type GenreMoviesRelationship { node: Movie! } -input GenreOptions { - limit: Int - offset: Int - """ - Specify one or more GenreSort objects to sort Genres by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [GenreSort!] -} - """ Fields to sort Genres by. The order in which sorts are applied is not guaranteed when specifying many fields in one GenreSort object. """ @@ -106,9 +97,10 @@ input GenreWhere { movies_SINGLE: MovieWhere """Return Genres where some of the related Movies match this filter""" movies_SOME: MovieWhere - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -120,8 +112,8 @@ type GenresConnection { } type Movie { - genres(directed: Boolean = true, options: GenreOptions, where: GenreWhere): [Genre!]! @deprecated(reason: "Do not use genre") - genresConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! @deprecated(reason: "Do not use genre") + genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! @deprecated(reason: "Do not use genre") + genresConnection(after: String, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! @deprecated(reason: "Do not use genre") imdbRating: Float title: String @deprecated(reason: "Do not use title") year: Int @@ -154,15 +146,6 @@ type MovieGenresRelationship { node: Genre! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -200,7 +183,8 @@ input MovieWhere { genres_SINGLE: GenreWhere @deprecated(reason: "Do not use genre") """Return Movies where some of the related Genres match this filter""" genres_SOME: GenreWhere @deprecated(reason: "Do not use genre") - imdbRating: Float + imdbRating: Float @deprecated(reason: "Please use the explicit _EQ version") + imdbRating_EQ: Float imdbRating_GT: Float imdbRating_GTE: Float imdbRating_IN: [Float] @@ -209,9 +193,11 @@ input MovieWhere { title: String @deprecated(reason: "Do not use title") title_CONTAINS: String @deprecated(reason: "Do not use title") title_ENDS_WITH: String @deprecated(reason: "Do not use title") + title_EQ: String @deprecated(reason: "Do not use title") title_IN: [String] @deprecated(reason: "Do not use title") title_STARTS_WITH: String @deprecated(reason: "Do not use title") - year: Int + year: Int @deprecated(reason: "Please use the explicit _EQ version") + year_EQ: Int year_GT: Int year_GTE: Int year_IN: [Int] @@ -234,10 +220,10 @@ type PageInfo { } type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! + genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/issues/2969.adoc b/core/src/test/resources/tck-test-files/schema/v2/issues/2969.adoc index 7b0523dd..f17ea476 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/issues/2969.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/issues/2969.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Post { +type Post @node { content: String! author: User! @relationship(type: "HAS_AUTHOR", direction: OUT) } -type User { +type User @node { id: ID! name: String! posts: [Post!]! @relationship(type: "HAS_AUTHOR", direction: IN) @@ -36,8 +36,8 @@ type PageInfo { } type Post { - author(directed: Boolean = true, options: UserOptions, where: UserWhere): User! - authorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! + author(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): User! + authorConnection(after: String, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! content: String! } @@ -64,17 +64,17 @@ type PostsConnection { } type Query { - posts(options: PostOptions, where: PostWhere): [Post!]! - postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! + posts(limit: Int, offset: Int, sort: [PostSort!], where: PostWhere): [Post!]! + postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! + users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! + usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } type User { id: ID! name: String! - posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! - postsConnection(after: String, directed: Boolean = true, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! + posts(limit: Int, offset: Int, sort: [PostSort!], where: PostWhere): [Post!]! + postsConnection(after: String, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! } type UserEdge { @@ -118,13 +118,6 @@ input PostAuthorConnectionWhere { node: UserWhere } -input PostOptions { - limit: Int - offset: Int - "Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PostSort!] -} - "Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object." input PostSort { content: SortDirection @@ -136,22 +129,14 @@ input PostWhere { OR: [PostWhere!] author: UserWhere authorConnection: PostAuthorConnectionWhere - authorConnection_NOT: PostAuthorConnectionWhere - author_NOT: UserWhere - content: String + content: String @deprecated(reason : "Please use the explicit _EQ version") content_CONTAINS: String content_ENDS_WITH: String + content_EQ: String content_IN: [String!] content_STARTS_WITH: String } -input UserOptions { - limit: Int - offset: Int - "Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array." - sort: [UserSort!] -} - input UserPostsConnectionSort { node: PostSort } @@ -173,14 +158,16 @@ input UserWhere { AND: [UserWhere!] NOT: UserWhere OR: [UserWhere!] - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID!] id_STARTS_WITH: ID - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String "Return Users where all of the related UserPostsConnections match this filter" diff --git a/core/src/test/resources/tck-test-files/schema/v2/issues/2969.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/issues/2969.js.adoc index 080843da..16ae4d51 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/issues/2969.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/issues/2969.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Post { +type Post @node { content: String! author: User! @relationship(type: "HAS_AUTHOR", direction: OUT) } -type User { +type User @node { id: ID! name: String! posts: [Post!]! @relationship(type: "HAS_AUTHOR", direction: IN) @@ -37,8 +37,8 @@ type PageInfo { } type Post { - author(directed: Boolean = true, options: UserOptions, where: UserWhere): User! - authorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! + author(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): User! + authorConnection(after: String, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! content: String! } @@ -69,15 +69,6 @@ type PostEdge { node: Post! } -input PostOptions { - limit: Int - offset: Int - """ - Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PostSort!] -} - """ Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. """ @@ -91,11 +82,10 @@ input PostWhere { OR: [PostWhere!] author: UserWhere authorConnection: PostAuthorConnectionWhere - authorConnection_NOT: PostAuthorConnectionWhere - author_NOT: UserWhere - content: String + content: String @deprecated(reason: "Please use the explicit _EQ version") content_CONTAINS: String content_ENDS_WITH: String + content_EQ: String content_IN: [String!] content_STARTS_WITH: String } @@ -107,10 +97,10 @@ type PostsConnection { } type Query { - posts(options: PostOptions, where: PostWhere): [Post!]! - postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! + posts(limit: Int, offset: Int, sort: [PostSort!], where: PostWhere): [Post!]! + postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! + users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! + usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } """An enum for sorting in either ascending or descending order.""" @@ -124,8 +114,8 @@ enum SortDirection { type User { id: ID! name: String! - posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! - postsConnection(after: String, directed: Boolean = true, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! + posts(limit: Int, offset: Int, sort: [PostSort!], where: PostWhere): [Post!]! + postsConnection(after: String, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! } type UserEdge { @@ -133,15 +123,6 @@ type UserEdge { node: User! } -input UserOptions { - limit: Int - offset: Int - """ - Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [UserSort!] -} - type UserPostsConnection { edges: [UserPostsRelationship!]! pageInfo: PageInfo! @@ -176,14 +157,16 @@ input UserWhere { AND: [UserWhere!] NOT: UserWhere OR: [UserWhere!] - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID!] id_STARTS_WITH: ID - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String """ diff --git a/core/src/test/resources/tck-test-files/schema/v2/issues/2981.adoc b/core/src/test/resources/tck-test-files/schema/v2/issues/2981.adoc index 18ac65dc..124ae0df 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/issues/2981.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/issues/2981.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Book { +type Book @node { originalTitle: String! translatedTitle: BookTitle @relationship(type: "TRANSLATED_BOOK_TITLE", direction: IN) isbn: String! @@ -16,12 +16,12 @@ type Book { union BookTitle = BookTitle_SV | BookTitle_EN -type BookTitle_SV { +type BookTitle_SV @node { book: Book! @relationship(type: "TRANSLATED_BOOK_TITLE", direction: OUT) value: String! } -type BookTitle_EN { +type BookTitle_EN @node { book: Book! @relationship(type: "TRANSLATED_BOOK_TITLE", direction: OUT) value: String! } @@ -39,8 +39,8 @@ union BookTitle = BookTitle_EN | BookTitle_SV type Book { isbn: String! originalTitle: String! - translatedTitle(directed: Boolean = true, options: QueryOptions, where: BookTitleWhere): BookTitle - translatedTitleConnection(after: String, directed: Boolean = true, first: Int, where: BookTranslatedTitleConnectionWhere): BookTranslatedTitleConnection! + translatedTitle(limit: Int, offset: Int, where: BookTitleWhere): BookTitle + translatedTitleConnection(after: String, first: Int, where: BookTranslatedTitleConnectionWhere): BookTranslatedTitleConnection! } type BookEdge { @@ -61,8 +61,8 @@ type BookTitleSvsConnection { } type BookTitle_EN { - book(directed: Boolean = true, options: BookOptions, where: BookWhere): Book! - bookConnection(after: String, directed: Boolean = true, first: Int, sort: [BookTitle_ENBookConnectionSort!], where: BookTitle_ENBookConnectionWhere): BookTitle_ENBookConnection! + book(limit: Int, offset: Int, sort: [BookSort!], where: BookWhere): Book! + bookConnection(after: String, first: Int, sort: [BookTitle_ENBookConnectionSort!], where: BookTitle_ENBookConnectionWhere): BookTitle_ENBookConnection! value: String! } @@ -83,8 +83,8 @@ type BookTitle_ENEdge { } type BookTitle_SV { - book(directed: Boolean = true, options: BookOptions, where: BookWhere): Book! - bookConnection(after: String, directed: Boolean = true, first: Int, sort: [BookTitle_SVBookConnectionSort!], where: BookTitle_SVBookConnectionWhere): BookTitle_SVBookConnection! + book(limit: Int, offset: Int, sort: [BookSort!], where: BookWhere): Book! + bookConnection(after: String, first: Int, sort: [BookTitle_SVBookConnectionSort!], where: BookTitle_SVBookConnectionWhere): BookTitle_SVBookConnection! value: String! } @@ -130,13 +130,13 @@ type PageInfo { } type Query { - bookTitleEns(options: BookTitle_ENOptions, where: BookTitle_ENWhere): [BookTitle_EN!]! - bookTitleEnsConnection(after: String, first: Int, sort: [BookTitle_ENSort], where: BookTitle_ENWhere): BookTitleEnsConnection! - bookTitleSvs(options: BookTitle_SVOptions, where: BookTitle_SVWhere): [BookTitle_SV!]! - bookTitleSvsConnection(after: String, first: Int, sort: [BookTitle_SVSort], where: BookTitle_SVWhere): BookTitleSvsConnection! - bookTitles(options: QueryOptions, where: BookTitleWhere): [BookTitle!]! - books(options: BookOptions, where: BookWhere): [Book!]! - booksConnection(after: String, first: Int, sort: [BookSort], where: BookWhere): BooksConnection! + bookTitleEns(limit: Int, offset: Int, sort: [BookTitle_ENSort!], where: BookTitle_ENWhere): [BookTitle_EN!]! + bookTitleEnsConnection(after: String, first: Int, sort: [BookTitle_ENSort!], where: BookTitle_ENWhere): BookTitleEnsConnection! + bookTitleSvs(limit: Int, offset: Int, sort: [BookTitle_SVSort!], where: BookTitle_SVWhere): [BookTitle_SV!]! + bookTitleSvsConnection(after: String, first: Int, sort: [BookTitle_SVSort!], where: BookTitle_SVWhere): BookTitleSvsConnection! + bookTitles(limit: Int, offset: Int, where: BookTitleWhere): [BookTitle!]! + books(limit: Int, offset: Int, sort: [BookSort!], where: BookWhere): [Book!]! + booksConnection(after: String, first: Int, sort: [BookSort!], where: BookWhere): BooksConnection! } "An enum for sorting in either ascending or descending order." @@ -147,13 +147,6 @@ enum SortDirection { DESC } -input BookOptions { - limit: Int - offset: Int - "Specify one or more BookSort objects to sort Books by. The sorts will be applied in the order in which they are arranged in the array." - sort: [BookSort!] -} - "Fields to sort Books by. The order in which sorts are applied is not guaranteed when specifying many fields in one BookSort object." input BookSort { isbn: SortDirection @@ -176,13 +169,6 @@ input BookTitle_ENBookConnectionWhere { node: BookWhere } -input BookTitle_ENOptions { - limit: Int - offset: Int - "Specify one or more BookTitle_ENSort objects to sort BookTitleEns by. The sorts will be applied in the order in which they are arranged in the array." - sort: [BookTitle_ENSort!] -} - "Fields to sort BookTitleEns by. The order in which sorts are applied is not guaranteed when specifying many fields in one BookTitle_ENSort object." input BookTitle_ENSort { value: SortDirection @@ -194,11 +180,10 @@ input BookTitle_ENWhere { OR: [BookTitle_ENWhere!] book: BookWhere bookConnection: BookTitle_ENBookConnectionWhere - bookConnection_NOT: BookTitle_ENBookConnectionWhere - book_NOT: BookWhere - value: String + value: String @deprecated(reason : "Please use the explicit _EQ version") value_CONTAINS: String value_ENDS_WITH: String + value_EQ: String value_IN: [String!] value_STARTS_WITH: String } @@ -214,13 +199,6 @@ input BookTitle_SVBookConnectionWhere { node: BookWhere } -input BookTitle_SVOptions { - limit: Int - offset: Int - "Specify one or more BookTitle_SVSort objects to sort BookTitleSvs by. The sorts will be applied in the order in which they are arranged in the array." - sort: [BookTitle_SVSort!] -} - "Fields to sort BookTitleSvs by. The order in which sorts are applied is not guaranteed when specifying many fields in one BookTitle_SVSort object." input BookTitle_SVSort { value: SortDirection @@ -232,11 +210,10 @@ input BookTitle_SVWhere { OR: [BookTitle_SVWhere!] book: BookWhere bookConnection: BookTitle_SVBookConnectionWhere - bookConnection_NOT: BookTitle_SVBookConnectionWhere - book_NOT: BookWhere - value: String + value: String @deprecated(reason : "Please use the explicit _EQ version") value_CONTAINS: String value_ENDS_WITH: String + value_EQ: String value_IN: [String!] value_STARTS_WITH: String } @@ -264,26 +241,20 @@ input BookWhere { AND: [BookWhere!] NOT: BookWhere OR: [BookWhere!] - isbn: String + isbn: String @deprecated(reason : "Please use the explicit _EQ version") isbn_CONTAINS: String isbn_ENDS_WITH: String + isbn_EQ: String isbn_IN: [String!] isbn_STARTS_WITH: String - originalTitle: String + originalTitle: String @deprecated(reason : "Please use the explicit _EQ version") originalTitle_CONTAINS: String originalTitle_ENDS_WITH: String + originalTitle_EQ: String originalTitle_IN: [String!] originalTitle_STARTS_WITH: String translatedTitle: BookTitleWhere translatedTitleConnection: BookTranslatedTitleConnectionWhere - translatedTitleConnection_NOT: BookTranslatedTitleConnectionWhere - translatedTitle_NOT: BookTitleWhere -} - -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int } ---- diff --git a/core/src/test/resources/tck-test-files/schema/v2/issues/2981.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/issues/2981.js.adoc index e3717564..34cc7332 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/issues/2981.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/issues/2981.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Book { +type Book @node { originalTitle: String! translatedTitle: BookTitle @relationship(type: "TRANSLATED_BOOK_TITLE", direction: IN) isbn: String! @@ -17,12 +17,12 @@ type Book { union BookTitle = BookTitle_SV | BookTitle_EN -type BookTitle_SV { +type BookTitle_SV @node { book: Book! @relationship(type: "TRANSLATED_BOOK_TITLE", direction: OUT) value: String! } -type BookTitle_EN { +type BookTitle_EN @node { book: Book! @relationship(type: "TRANSLATED_BOOK_TITLE", direction: OUT) value: String! } @@ -38,8 +38,8 @@ schema { type Book { isbn: String! originalTitle: String! - translatedTitle(directed: Boolean = true, options: QueryOptions, where: BookTitleWhere): BookTitle - translatedTitleConnection(after: String, directed: Boolean = true, first: Int, where: BookTranslatedTitleConnectionWhere): BookTranslatedTitleConnection! + translatedTitle(limit: Int, offset: Int, where: BookTitleWhere): BookTitle + translatedTitleConnection(after: String, first: Int, where: BookTranslatedTitleConnectionWhere): BookTranslatedTitleConnection! } type BookEdge { @@ -47,15 +47,6 @@ type BookEdge { node: Book! } -input BookOptions { - limit: Int - offset: Int - """ - Specify one or more BookSort objects to sort Books by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [BookSort!] -} - """ Fields to sort Books by. The order in which sorts are applied is not guaranteed when specifying many fields in one BookSort object. """ @@ -84,8 +75,8 @@ input BookTitleWhere { } type BookTitle_EN { - book(directed: Boolean = true, options: BookOptions, where: BookWhere): Book! - bookConnection(after: String, directed: Boolean = true, first: Int, sort: [BookTitle_ENBookConnectionSort!], where: BookTitle_ENBookConnectionWhere): BookTitle_ENBookConnection! + book(limit: Int, offset: Int, sort: [BookSort!], where: BookWhere): Book! + bookConnection(after: String, first: Int, sort: [BookTitle_ENBookConnectionSort!], where: BookTitle_ENBookConnectionWhere): BookTitle_ENBookConnection! value: String! } @@ -116,15 +107,6 @@ type BookTitle_ENEdge { node: BookTitle_EN! } -input BookTitle_ENOptions { - limit: Int - offset: Int - """ - Specify one or more BookTitle_ENSort objects to sort BookTitleEns by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [BookTitle_ENSort!] -} - """ Fields to sort BookTitleEns by. The order in which sorts are applied is not guaranteed when specifying many fields in one BookTitle_ENSort object. """ @@ -138,18 +120,17 @@ input BookTitle_ENWhere { OR: [BookTitle_ENWhere!] book: BookWhere bookConnection: BookTitle_ENBookConnectionWhere - bookConnection_NOT: BookTitle_ENBookConnectionWhere - book_NOT: BookWhere - value: String + value: String @deprecated(reason: "Please use the explicit _EQ version") value_CONTAINS: String value_ENDS_WITH: String + value_EQ: String value_IN: [String!] value_STARTS_WITH: String } type BookTitle_SV { - book(directed: Boolean = true, options: BookOptions, where: BookWhere): Book! - bookConnection(after: String, directed: Boolean = true, first: Int, sort: [BookTitle_SVBookConnectionSort!], where: BookTitle_SVBookConnectionWhere): BookTitle_SVBookConnection! + book(limit: Int, offset: Int, sort: [BookSort!], where: BookWhere): Book! + bookConnection(after: String, first: Int, sort: [BookTitle_SVBookConnectionSort!], where: BookTitle_SVBookConnectionWhere): BookTitle_SVBookConnection! value: String! } @@ -180,15 +161,6 @@ type BookTitle_SVEdge { node: BookTitle_SV! } -input BookTitle_SVOptions { - limit: Int - offset: Int - """ - Specify one or more BookTitle_SVSort objects to sort BookTitleSvs by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [BookTitle_SVSort!] -} - """ Fields to sort BookTitleSvs by. The order in which sorts are applied is not guaranteed when specifying many fields in one BookTitle_SVSort object. """ @@ -202,11 +174,10 @@ input BookTitle_SVWhere { OR: [BookTitle_SVWhere!] book: BookWhere bookConnection: BookTitle_SVBookConnectionWhere - bookConnection_NOT: BookTitle_SVBookConnectionWhere - book_NOT: BookWhere - value: String + value: String @deprecated(reason: "Please use the explicit _EQ version") value_CONTAINS: String value_ENDS_WITH: String + value_EQ: String value_IN: [String!] value_STARTS_WITH: String } @@ -245,20 +216,20 @@ input BookWhere { AND: [BookWhere!] NOT: BookWhere OR: [BookWhere!] - isbn: String + isbn: String @deprecated(reason: "Please use the explicit _EQ version") isbn_CONTAINS: String isbn_ENDS_WITH: String + isbn_EQ: String isbn_IN: [String!] isbn_STARTS_WITH: String - originalTitle: String + originalTitle: String @deprecated(reason: "Please use the explicit _EQ version") originalTitle_CONTAINS: String originalTitle_ENDS_WITH: String + originalTitle_EQ: String originalTitle_IN: [String!] originalTitle_STARTS_WITH: String translatedTitle: BookTitleWhere translatedTitleConnection: BookTranslatedTitleConnectionWhere - translatedTitleConnection_NOT: BookTranslatedTitleConnectionWhere - translatedTitle_NOT: BookTitleWhere } type BooksConnection { @@ -276,19 +247,13 @@ type PageInfo { } type Query { - bookTitleEns(options: BookTitle_ENOptions, where: BookTitle_ENWhere): [BookTitle_EN!]! - bookTitleEnsConnection(after: String, first: Int, sort: [BookTitle_ENSort], where: BookTitle_ENWhere): BookTitleEnsConnection! - bookTitleSvs(options: BookTitle_SVOptions, where: BookTitle_SVWhere): [BookTitle_SV!]! - bookTitleSvsConnection(after: String, first: Int, sort: [BookTitle_SVSort], where: BookTitle_SVWhere): BookTitleSvsConnection! - bookTitles(options: QueryOptions, where: BookTitleWhere): [BookTitle!]! - books(options: BookOptions, where: BookWhere): [Book!]! - booksConnection(after: String, first: Int, sort: [BookSort], where: BookWhere): BooksConnection! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int + bookTitleEns(limit: Int, offset: Int, sort: [BookTitle_ENSort!], where: BookTitle_ENWhere): [BookTitle_EN!]! + bookTitleEnsConnection(after: String, first: Int, sort: [BookTitle_ENSort!], where: BookTitle_ENWhere): BookTitleEnsConnection! + bookTitleSvs(limit: Int, offset: Int, sort: [BookTitle_SVSort!], where: BookTitle_SVWhere): [BookTitle_SV!]! + bookTitleSvsConnection(after: String, first: Int, sort: [BookTitle_SVSort!], where: BookTitle_SVWhere): BookTitleSvsConnection! + bookTitles(limit: Int, offset: Int, where: BookTitleWhere): [BookTitle!]! + books(limit: Int, offset: Int, sort: [BookSort!], where: BookWhere): [Book!]! + booksConnection(after: String, first: Int, sort: [BookSort!], where: BookWhere): BooksConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/issues/3816.adoc b/core/src/test/resources/tck-test-files/schema/v2/issues/3816.adoc index 9a3dd282..2cfeb146 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/issues/3816.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/issues/3816.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { name: String! genre: Genre! @relationship(type: "HAS_GENRE", direction: OUT, nestedOperations: [CONNECT, DISCONNECT]) } -type Genre { +type Genre @node { name: String! movies: [Movie!]! @relationship(type: "HAS_GENRE", direction: IN) } @@ -27,8 +27,8 @@ schema { } type Genre { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! name: String! } @@ -55,8 +55,8 @@ type GenresConnection { } type Movie { - genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! - genreConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! + genre(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): Genre! + genreConnection(after: String, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! name: String! } @@ -91,10 +91,10 @@ type PageInfo { } type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! + genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -116,13 +116,6 @@ input GenreMoviesConnectionWhere { node: MovieWhere } -input GenreOptions { - limit: Int - offset: Int - "Specify one or more GenreSort objects to sort Genres by. The sorts will be applied in the order in which they are arranged in the array." - sort: [GenreSort!] -} - "Fields to sort Genres by. The order in which sorts are applied is not guaranteed when specifying many fields in one GenreSort object." input GenreSort { name: SortDirection @@ -148,9 +141,10 @@ input GenreWhere { movies_SINGLE: MovieWhere "Return Genres where some of the related Movies match this filter" movies_SOME: MovieWhere - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } @@ -166,13 +160,6 @@ input MovieGenreConnectionWhere { node: GenreWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { name: SortDirection @@ -184,11 +171,10 @@ input MovieWhere { OR: [MovieWhere!] genre: GenreWhere genreConnection: MovieGenreConnectionWhere - genreConnection_NOT: MovieGenreConnectionWhere - genre_NOT: GenreWhere - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } @@ -200,12 +186,12 @@ input MovieWhere { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { name: String! genre: Genre! @relationship(type: "HAS_GENRE", direction: OUT, nestedOperations: []) } -type Genre { +type Genre @node { name: String! movies: [Movie!]! @relationship(type: "HAS_GENRE", direction: IN) } @@ -219,8 +205,8 @@ schema { } type Genre { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! name: String! } @@ -247,8 +233,8 @@ type GenresConnection { } type Movie { - genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! - genreConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! + genre(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): Genre! + genreConnection(after: String, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! name: String! } @@ -283,10 +269,10 @@ type PageInfo { } type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! + genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -308,13 +294,6 @@ input GenreMoviesConnectionWhere { node: MovieWhere } -input GenreOptions { - limit: Int - offset: Int - "Specify one or more GenreSort objects to sort Genres by. The sorts will be applied in the order in which they are arranged in the array." - sort: [GenreSort!] -} - "Fields to sort Genres by. The order in which sorts are applied is not guaranteed when specifying many fields in one GenreSort object." input GenreSort { name: SortDirection @@ -340,9 +319,10 @@ input GenreWhere { movies_SINGLE: MovieWhere "Return Genres where some of the related Movies match this filter" movies_SOME: MovieWhere - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } @@ -358,13 +338,6 @@ input MovieGenreConnectionWhere { node: GenreWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { name: SortDirection @@ -376,11 +349,10 @@ input MovieWhere { OR: [MovieWhere!] genre: GenreWhere genreConnection: MovieGenreConnectionWhere - genreConnection_NOT: MovieGenreConnectionWhere - genre_NOT: GenreWhere - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } diff --git a/core/src/test/resources/tck-test-files/schema/v2/issues/3816.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/issues/3816.js.adoc index 3ae457f8..7c3f4026 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/issues/3816.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/issues/3816.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { name: String! genre: Genre! @relationship(type: "HAS_GENRE", direction: OUT, nestedOperations: [CONNECT, DISCONNECT]) } -type Genre { +type Genre @node { name: String! movies: [Movie!]! @relationship(type: "HAS_GENRE", direction: IN) } @@ -28,8 +28,8 @@ schema { } type Genre { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! name: String! } @@ -60,15 +60,6 @@ type GenreMoviesRelationship { node: Movie! } -input GenreOptions { - limit: Int - offset: Int - """ - Specify one or more GenreSort objects to sort Genres by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [GenreSort!] -} - """ Fields to sort Genres by. The order in which sorts are applied is not guaranteed when specifying many fields in one GenreSort object. """ @@ -104,9 +95,10 @@ input GenreWhere { movies_SINGLE: MovieWhere """Return Genres where some of the related Movies match this filter""" movies_SOME: MovieWhere - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } @@ -118,8 +110,8 @@ type GenresConnection { } type Movie { - genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! - genreConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! + genre(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): Genre! + genreConnection(after: String, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! name: String! } @@ -150,15 +142,6 @@ type MovieGenreRelationship { node: Genre! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -172,11 +155,10 @@ input MovieWhere { OR: [MovieWhere!] genre: GenreWhere genreConnection: MovieGenreConnectionWhere - genreConnection_NOT: MovieGenreConnectionWhere - genre_NOT: GenreWhere - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } @@ -196,10 +178,10 @@ type PageInfo { } type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! + genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" @@ -216,12 +198,12 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { name: String! genre: Genre! @relationship(type: "HAS_GENRE", direction: OUT, nestedOperations: []) } -type Genre { +type Genre @node { name: String! movies: [Movie!]! @relationship(type: "HAS_GENRE", direction: IN) } @@ -235,8 +217,8 @@ schema { } type Genre { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! name: String! } @@ -267,15 +249,6 @@ type GenreMoviesRelationship { node: Movie! } -input GenreOptions { - limit: Int - offset: Int - """ - Specify one or more GenreSort objects to sort Genres by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [GenreSort!] -} - """ Fields to sort Genres by. The order in which sorts are applied is not guaranteed when specifying many fields in one GenreSort object. """ @@ -311,9 +284,10 @@ input GenreWhere { movies_SINGLE: MovieWhere """Return Genres where some of the related Movies match this filter""" movies_SOME: MovieWhere - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } @@ -325,8 +299,8 @@ type GenresConnection { } type Movie { - genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! - genreConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! + genre(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): Genre! + genreConnection(after: String, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! name: String! } @@ -357,15 +331,6 @@ type MovieGenreRelationship { node: Genre! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -379,11 +344,10 @@ input MovieWhere { OR: [MovieWhere!] genre: GenreWhere genreConnection: MovieGenreConnectionWhere - genreConnection_NOT: MovieGenreConnectionWhere - genre_NOT: GenreWhere - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } @@ -403,10 +367,10 @@ type PageInfo { } type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! + genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/issues/5428.adoc b/core/src/test/resources/tck-test-files/schema/v2/issues/5428.adoc index 3bee1d9d..82d2b8a2 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/issues/5428.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/issues/5428.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Test @plural(value: "Test") { +type Test @plural(value: "Test") @node { Name: String } ---- @@ -29,8 +29,8 @@ type PageInfo { } type Query { - test(options: TestOptions, where: TestWhere): [Test!]! - testConnection(after: String, first: Int, sort: [TestSort], where: TestWhere): TestConnection! + test(limit: Int, offset: Int, sort: [TestSort!], where: TestWhere): [Test!]! + testConnection(after: String, first: Int, sort: [TestSort!], where: TestWhere): TestConnection! } type Test { @@ -56,13 +56,6 @@ enum SortDirection { DESC } -input TestOptions { - limit: Int - offset: Int - "Specify one or more TestSort objects to sort Test by. The sorts will be applied in the order in which they are arranged in the array." - sort: [TestSort!] -} - "Fields to sort Test by. The order in which sorts are applied is not guaranteed when specifying many fields in one TestSort object." input TestSort { Name: SortDirection @@ -71,9 +64,10 @@ input TestSort { input TestWhere { AND: [TestWhere!] NOT: TestWhere - Name: String + Name: String @deprecated(reason : "Please use the explicit _EQ version") Name_CONTAINS: String Name_ENDS_WITH: String + Name_EQ: String Name_IN: [String] Name_STARTS_WITH: String OR: [TestWhere!] diff --git a/core/src/test/resources/tck-test-files/schema/v2/issues/5428.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/issues/5428.js.adoc index 251ecd34..b4175f45 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/issues/5428.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/issues/5428.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Test @plural(value: "Test") { +type Test @plural(value: "Test") @node { Name: String } ---- @@ -30,8 +30,8 @@ type PageInfo { } type Query { - test(options: TestOptions, where: TestWhere): [Test!]! - testConnection(after: String, first: Int, sort: [TestSort], where: TestWhere): TestConnection! + test(limit: Int, offset: Int, sort: [TestSort!], where: TestWhere): [Test!]! + testConnection(after: String, first: Int, sort: [TestSort!], where: TestWhere): TestConnection! } """An enum for sorting in either ascending or descending order.""" @@ -57,15 +57,6 @@ type TestEdge { node: Test! } -input TestOptions { - limit: Int - offset: Int - """ - Specify one or more TestSort objects to sort Test by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [TestSort!] -} - """ Fields to sort Test by. The order in which sorts are applied is not guaranteed when specifying many fields in one TestSort object. """ @@ -76,9 +67,10 @@ input TestSort { input TestWhere { AND: [TestWhere!] NOT: TestWhere - Name: String + Name: String @deprecated(reason: "Please use the explicit _EQ version") Name_CONTAINS: String Name_ENDS_WITH: String + Name_EQ: String Name_IN: [String] Name_STARTS_WITH: String OR: [TestWhere!] diff --git a/core/src/test/resources/tck-test-files/schema/v2/issues/609.adoc b/core/src/test/resources/tck-test-files/schema/v2/issues/609.adoc index d9496f29..6702cd06 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/issues/609.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/issues/609.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Deprecated { +type Deprecated @node { deprecatedField: String @deprecated } ---- @@ -44,8 +44,8 @@ type PageInfo { } type Query { - deprecateds(options: DeprecatedOptions, where: DeprecatedWhere): [Deprecated!]! - deprecatedsConnection(after: String, first: Int, sort: [DeprecatedSort], where: DeprecatedWhere): DeprecatedsConnection! + deprecateds(limit: Int, offset: Int, sort: [DeprecatedSort!], where: DeprecatedWhere): [Deprecated!]! + deprecatedsConnection(after: String, first: Int, sort: [DeprecatedSort!], where: DeprecatedWhere): DeprecatedsConnection! } "An enum for sorting in either ascending or descending order." @@ -56,13 +56,6 @@ enum SortDirection { DESC } -input DeprecatedOptions { - limit: Int - offset: Int - "Specify one or more DeprecatedSort objects to sort Deprecateds by. The sorts will be applied in the order in which they are arranged in the array." - sort: [DeprecatedSort!] -} - "Fields to sort Deprecateds by. The order in which sorts are applied is not guaranteed when specifying many fields in one DeprecatedSort object." input DeprecatedSort { deprecatedField: SortDirection @deprecated(reason : "No longer supported") @@ -75,6 +68,7 @@ input DeprecatedWhere { deprecatedField: String @deprecated(reason : "No longer supported") deprecatedField_CONTAINS: String @deprecated(reason : "No longer supported") deprecatedField_ENDS_WITH: String @deprecated(reason : "No longer supported") + deprecatedField_EQ: String @deprecated(reason : "No longer supported") deprecatedField_IN: [String] @deprecated(reason : "No longer supported") deprecatedField_STARTS_WITH: String @deprecated(reason : "No longer supported") } diff --git a/core/src/test/resources/tck-test-files/schema/v2/issues/609.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/issues/609.js.adoc index 24f0e38a..a5c691a1 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/issues/609.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/issues/609.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Deprecated { +type Deprecated @node { deprecatedField: String @deprecated } ---- @@ -30,15 +30,6 @@ type DeprecatedEdge { node: Deprecated! } -input DeprecatedOptions { - limit: Int - offset: Int - """ - Specify one or more DeprecatedSort objects to sort Deprecateds by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [DeprecatedSort!] -} - """ Fields to sort Deprecateds by. The order in which sorts are applied is not guaranteed when specifying many fields in one DeprecatedSort object. """ @@ -53,6 +44,7 @@ input DeprecatedWhere { deprecatedField: String @deprecated deprecatedField_CONTAINS: String @deprecated deprecatedField_ENDS_WITH: String @deprecated + deprecatedField_EQ: String @deprecated deprecatedField_IN: [String] @deprecated deprecatedField_STARTS_WITH: String @deprecated } @@ -72,8 +64,8 @@ type PageInfo { } type Query { - deprecateds(options: DeprecatedOptions, where: DeprecatedWhere): [Deprecated!]! - deprecatedsConnection(after: String, first: Int, sort: [DeprecatedSort], where: DeprecatedWhere): DeprecatedsConnection! + deprecateds(limit: Int, offset: Int, sort: [DeprecatedSort!], where: DeprecatedWhere): [Deprecated!]! + deprecatedsConnection(after: String, first: Int, sort: [DeprecatedSort!], where: DeprecatedWhere): DeprecatedsConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/lowercase-type-names.adoc b/core/src/test/resources/tck-test-files/schema/v2/lowercase-type-names.adoc index b0369048..0a4d0890 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/lowercase-type-names.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/lowercase-type-names.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type movie { +type movie @node { name: String year: Int createdAt: DateTime @@ -16,7 +16,7 @@ type movie { actors: [actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type actor { +type actor @node { name: String year: Int createdAt: DateTime @@ -52,16 +52,16 @@ type PageInfo { } type Query { - actors(options: actorOptions, where: actorWhere): [actor!]! - actorsConnection(after: String, first: Int, sort: [actorSort], where: actorWhere): ActorsConnection! - movies(options: movieOptions, where: movieWhere): [movie!]! - moviesConnection(after: String, first: Int, sort: [movieSort], where: movieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [actorSort!], where: actorWhere): [actor!]! + actorsConnection(after: String, first: Int, sort: [actorSort!], where: actorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [movieSort!], where: movieWhere): [movie!]! + moviesConnection(after: String, first: Int, sort: [movieSort!], where: movieWhere): MoviesConnection! } type actor { createdAt: DateTime - movies(directed: Boolean = true, options: movieOptions, where: movieWhere): [movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [actorMoviesConnectionSort!], where: actorMoviesConnectionWhere): actorMoviesConnection! + movies(limit: Int, offset: Int, sort: [movieSort!], where: movieWhere): [movie!]! + moviesConnection(after: String, first: Int, sort: [actorMoviesConnectionSort!], where: actorMoviesConnectionWhere): actorMoviesConnection! name: String year: Int } @@ -83,8 +83,8 @@ type actorMoviesRelationship { } type movie { - actors(directed: Boolean = true, options: actorOptions, where: actorWhere): [actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [movieActorsConnectionSort!], where: movieActorsConnectionWhere): movieActorsConnection! + actors(limit: Int, offset: Int, sort: [actorSort!], where: actorWhere): [actor!]! + actorsConnection(after: String, first: Int, sort: [movieActorsConnectionSort!], where: movieActorsConnectionWhere): movieActorsConnection! createdAt: DateTime name: String testId: String @@ -129,13 +129,6 @@ input actorMoviesConnectionWhere { node: movieWhere } -input actorOptions { - limit: Int - offset: Int - "Specify one or more actorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [actorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one actorSort object." input actorSort { createdAt: SortDirection @@ -147,7 +140,8 @@ input actorWhere { AND: [actorWhere!] NOT: actorWhere OR: [actorWhere!] - createdAt: DateTime + createdAt: DateTime @deprecated(reason : "Please use the explicit _EQ version") + createdAt_EQ: DateTime createdAt_GT: DateTime createdAt_GTE: DateTime createdAt_IN: [DateTime] @@ -169,12 +163,14 @@ input actorWhere { movies_SINGLE: movieWhere "Return actors where some of the related movies match this filter" movies_SOME: movieWhere - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - year: Int + year: Int @deprecated(reason : "Please use the explicit _EQ version") + year_EQ: Int year_GT: Int year_GTE: Int year_IN: [Int] @@ -193,13 +189,6 @@ input movieActorsConnectionWhere { node: actorWhere } -input movieOptions { - limit: Int - offset: Int - "Specify one or more movieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [movieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one movieSort object." input movieSort { createdAt: SortDirection @@ -228,23 +217,27 @@ input movieWhere { actors_SINGLE: actorWhere "Return movies where some of the related actors match this filter" actors_SOME: actorWhere - createdAt: DateTime + createdAt: DateTime @deprecated(reason : "Please use the explicit _EQ version") + createdAt_EQ: DateTime createdAt_GT: DateTime createdAt_GTE: DateTime createdAt_IN: [DateTime] createdAt_LT: DateTime createdAt_LTE: DateTime - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - testId: String + testId: String @deprecated(reason : "Please use the explicit _EQ version") testId_CONTAINS: String testId_ENDS_WITH: String + testId_EQ: String testId_IN: [String] testId_STARTS_WITH: String - year: Int + year: Int @deprecated(reason : "Please use the explicit _EQ version") + year_EQ: Int year_GT: Int year_GTE: Int year_IN: [Int] diff --git a/core/src/test/resources/tck-test-files/schema/v2/lowercase-type-names.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/lowercase-type-names.js.adoc index 520b4111..24cc9620 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/lowercase-type-names.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/lowercase-type-names.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type movie { +type movie @node { name: String year: Int createdAt: DateTime @@ -17,7 +17,7 @@ type movie { actors: [actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type actor { +type actor @node { name: String year: Int createdAt: DateTime @@ -56,10 +56,10 @@ type PageInfo { } type Query { - actors(options: actorOptions, where: actorWhere): [actor!]! - actorsConnection(after: String, first: Int, sort: [actorSort], where: actorWhere): ActorsConnection! - movies(options: movieOptions, where: movieWhere): [movie!]! - moviesConnection(after: String, first: Int, sort: [movieSort], where: movieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [actorSort!], where: actorWhere): [actor!]! + actorsConnection(after: String, first: Int, sort: [actorSort!], where: actorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [movieSort!], where: movieWhere): [movie!]! + moviesConnection(after: String, first: Int, sort: [movieSort!], where: movieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" @@ -72,8 +72,8 @@ enum SortDirection { type actor { createdAt: DateTime - movies(directed: Boolean = true, options: movieOptions, where: movieWhere): [movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [actorMoviesConnectionSort!], where: actorMoviesConnectionWhere): actorMoviesConnection! + movies(limit: Int, offset: Int, sort: [movieSort!], where: movieWhere): [movie!]! + moviesConnection(after: String, first: Int, sort: [actorMoviesConnectionSort!], where: actorMoviesConnectionWhere): actorMoviesConnection! name: String year: Int } @@ -105,15 +105,6 @@ type actorMoviesRelationship { node: movie! } -input actorOptions { - limit: Int - offset: Int - """ - Specify one or more actorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [actorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one actorSort object. """ @@ -127,7 +118,8 @@ input actorWhere { AND: [actorWhere!] NOT: actorWhere OR: [actorWhere!] - createdAt: DateTime + createdAt: DateTime @deprecated(reason: "Please use the explicit _EQ version") + createdAt_EQ: DateTime createdAt_GT: DateTime createdAt_GTE: DateTime createdAt_IN: [DateTime] @@ -157,12 +149,14 @@ input actorWhere { movies_SINGLE: movieWhere """Return actors where some of the related movies match this filter""" movies_SOME: movieWhere - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - year: Int + year: Int @deprecated(reason: "Please use the explicit _EQ version") + year_EQ: Int year_GT: Int year_GTE: Int year_IN: [Int] @@ -171,8 +165,8 @@ input actorWhere { } type movie { - actors(directed: Boolean = true, options: actorOptions, where: actorWhere): [actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [movieActorsConnectionSort!], where: movieActorsConnectionWhere): movieActorsConnection! + actors(limit: Int, offset: Int, sort: [actorSort!], where: actorWhere): [actor!]! + actorsConnection(after: String, first: Int, sort: [movieActorsConnectionSort!], where: movieActorsConnectionWhere): movieActorsConnection! createdAt: DateTime name: String testId: String @@ -206,15 +200,6 @@ type movieEdge { node: movie! } -input movieOptions { - limit: Int - offset: Int - """ - Specify one or more movieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [movieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one movieSort object. """ @@ -253,23 +238,27 @@ input movieWhere { actors_SINGLE: actorWhere """Return movies where some of the related actors match this filter""" actors_SOME: actorWhere - createdAt: DateTime + createdAt: DateTime @deprecated(reason: "Please use the explicit _EQ version") + createdAt_EQ: DateTime createdAt_GT: DateTime createdAt_GTE: DateTime createdAt_IN: [DateTime] createdAt_LT: DateTime createdAt_LTE: DateTime - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String - testId: String + testId: String @deprecated(reason: "Please use the explicit _EQ version") testId_CONTAINS: String testId_ENDS_WITH: String + testId_EQ: String testId_IN: [String] testId_STARTS_WITH: String - year: Int + year: Int @deprecated(reason: "Please use the explicit _EQ version") + year_EQ: Int year_GT: Int year_GTE: Int year_IN: [Int] diff --git a/core/src/test/resources/tck-test-files/schema/v2/math.adoc b/core/src/test/resources/tck-test-files/schema/v2/math.adoc index 57f8a6ef..eca7d1f1 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/math.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/math.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID viewers: Int! } @@ -46,8 +46,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -58,13 +58,6 @@ enum SortDirection { DESC } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -75,12 +68,14 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - viewers: Int + viewers: Int @deprecated(reason : "Please use the explicit _EQ version") + viewers_EQ: Int viewers_GT: Int viewers_GTE: Int viewers_IN: [Int!] @@ -95,7 +90,7 @@ input MovieWhere { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID viewers: BigInt! } @@ -133,8 +128,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -148,13 +143,6 @@ enum SortDirection { "A BigInt value up to 64 bits in size, which can be a number or a string if used inline, or a string only if used as a variable. Always returned as a string." scalar BigInt -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -165,12 +153,14 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - viewers: BigInt + viewers: BigInt @deprecated(reason : "Please use the explicit _EQ version") + viewers_EQ: BigInt viewers_GT: BigInt viewers_GTE: BigInt viewers_IN: [BigInt!] @@ -185,7 +175,7 @@ input MovieWhere { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID viewers: Float! } @@ -223,8 +213,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -235,13 +225,6 @@ enum SortDirection { DESC } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -252,12 +235,14 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - viewers: Float + viewers: Float @deprecated(reason : "Please use the explicit _EQ version") + viewers_EQ: Float viewers_GT: Float viewers_GTE: Float viewers_IN: [Float!] @@ -272,13 +257,13 @@ input MovieWhere { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID viewers: Int! directedBy: Director @relationship(type: "DIRECTS", direction: IN) } -type Director { +type Director @node { lastName: String! directs: [Movie!]! @relationship(type: "DIRECTS", direction: OUT) } @@ -292,8 +277,8 @@ schema { } type Director { - directs(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - directsConnection(after: String, directed: Boolean = true, first: Int, sort: [DirectorDirectsConnectionSort!], where: DirectorDirectsConnectionWhere): DirectorDirectsConnection! + directs(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + directsConnection(after: String, first: Int, sort: [DirectorDirectsConnectionSort!], where: DirectorDirectsConnectionWhere): DirectorDirectsConnection! lastName: String! } @@ -320,8 +305,8 @@ type DirectorsConnection { } type Movie { - directedBy(directed: Boolean = true, options: DirectorOptions, where: DirectorWhere): Director - directedByConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieDirectedByConnectionSort!], where: MovieDirectedByConnectionWhere): MovieDirectedByConnection! + directedBy(limit: Int, offset: Int, sort: [DirectorSort!], where: DirectorWhere): Director + directedByConnection(after: String, first: Int, sort: [MovieDirectedByConnectionSort!], where: MovieDirectedByConnectionWhere): MovieDirectedByConnection! id: ID viewers: Int! } @@ -357,10 +342,10 @@ type PageInfo { } type Query { - directors(options: DirectorOptions, where: DirectorWhere): [Director!]! - directorsConnection(after: String, first: Int, sort: [DirectorSort], where: DirectorWhere): DirectorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + directors(limit: Int, offset: Int, sort: [DirectorSort!], where: DirectorWhere): [Director!]! + directorsConnection(after: String, first: Int, sort: [DirectorSort!], where: DirectorWhere): DirectorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -382,13 +367,6 @@ input DirectorDirectsConnectionWhere { node: MovieWhere } -input DirectorOptions { - limit: Int - offset: Int - "Specify one or more DirectorSort objects to sort Directors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [DirectorSort!] -} - "Fields to sort Directors by. The order in which sorts are applied is not guaranteed when specifying many fields in one DirectorSort object." input DirectorSort { lastName: SortDirection @@ -414,9 +392,10 @@ input DirectorWhere { directs_SINGLE: MovieWhere "Return Directors where some of the related Movies match this filter" directs_SOME: MovieWhere - lastName: String + lastName: String @deprecated(reason : "Please use the explicit _EQ version") lastName_CONTAINS: String lastName_ENDS_WITH: String + lastName_EQ: String lastName_IN: [String!] lastName_STARTS_WITH: String } @@ -432,13 +411,6 @@ input MovieDirectedByConnectionWhere { node: DirectorWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -451,14 +423,14 @@ input MovieWhere { OR: [MovieWhere!] directedBy: DirectorWhere directedByConnection: MovieDirectedByConnectionWhere - directedByConnection_NOT: MovieDirectedByConnectionWhere - directedBy_NOT: DirectorWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - viewers: Int + viewers: Int @deprecated(reason : "Please use the explicit _EQ version") + viewers_EQ: Int viewers_GT: Int viewers_GTE: Int viewers_IN: [Int!] @@ -477,13 +449,13 @@ interface Production { viewers: Int! } -type Movie implements Production { +type Movie implements Production @node { id: ID viewers: Int! workers: [Person!]! @relationship(type: "WORKED_IN", direction: IN) } -type Person { +type Person @node { name: String! worksInProduction: [Production!]! @relationship(type: "WORKED_IN", direction: OUT) } @@ -503,8 +475,8 @@ interface Production { type Movie implements Production { id: ID viewers: Int! - workers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - workersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieWorkersConnectionSort!], where: MovieWorkersConnectionWhere): MovieWorkersConnection! + workers(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + workersConnection(after: String, first: Int, sort: [MovieWorkersConnectionSort!], where: MovieWorkersConnectionWhere): MovieWorkersConnection! } type MovieEdge { @@ -545,8 +517,8 @@ type PeopleConnection { type Person { name: String! - worksInProduction(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - worksInProductionConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonWorksInProductionConnectionSort!], where: PersonWorksInProductionConnectionWhere): PersonWorksInProductionConnection! + worksInProduction(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! + worksInProductionConnection(after: String, first: Int, sort: [PersonWorksInProductionConnectionSort!], where: PersonWorksInProductionConnectionWhere): PersonWorksInProductionConnection! } type PersonEdge { @@ -577,12 +549,12 @@ type ProductionsConnection { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! + productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! + productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! } enum ProductionImplementation { @@ -597,13 +569,6 @@ enum SortDirection { DESC } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -614,12 +579,14 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - viewers: Int + viewers: Int @deprecated(reason : "Please use the explicit _EQ version") + viewers_EQ: Int viewers_GT: Int viewers_GTE: Int viewers_IN: [Int!] @@ -654,13 +621,6 @@ input MovieWorkersConnectionWhere { node: PersonWhere } -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort!] -} - "Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." input PersonSort { name: SortDirection @@ -670,9 +630,10 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String "Return People where all of the related PersonWorksInProductionConnections match this filter" @@ -704,13 +665,6 @@ input PersonWorksInProductionConnectionWhere { node: ProductionWhere } -input ProductionOptions { - limit: Int - offset: Int - "Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ProductionSort] -} - "Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object." input ProductionSort { viewers: SortDirection @@ -720,8 +674,9 @@ input ProductionWhere { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] - typename_IN: [ProductionImplementation!] - viewers: Int + typename: [ProductionImplementation!] + viewers: Int @deprecated(reason : "Please use the explicit _EQ version") + viewers_EQ: Int viewers_GT: Int viewers_GTE: Int viewers_IN: [Int!] @@ -736,12 +691,12 @@ input ProductionWhere { .Schema [source,graphql,schema=true] ---- -type Person { +type Person @node { name: String! actedInMovies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } -type Movie { +type Movie @node { title: String! actors: [Person!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } @@ -770,8 +725,8 @@ type ActedIn { } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String! } @@ -813,8 +768,8 @@ type PeopleConnection { } type Person { - actedInMovies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInMoviesConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonActedInMoviesConnectionSort!], where: PersonActedInMoviesConnectionWhere): PersonActedInMoviesConnection! + actedInMovies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + actedInMoviesConnection(after: String, first: Int, sort: [PersonActedInMoviesConnectionSort!], where: PersonActedInMoviesConnectionWhere): PersonActedInMoviesConnection! name: String! } @@ -836,10 +791,10 @@ type PersonEdge { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } "An enum for sorting in either ascending or descending order." @@ -859,13 +814,15 @@ input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - pay: Float + pay: Float @deprecated(reason : "Please use the explicit _EQ version") + pay_EQ: Float pay_GT: Float pay_GTE: Float pay_IN: [Float] pay_LT: Float pay_LTE: Float - roles: [String!] + roles: [String!] @deprecated(reason : "Please use the explicit _EQ version") + roles_EQ: [String!] roles_INCLUDES: String } @@ -882,13 +839,6 @@ input MovieActorsConnectionWhere { node: PersonWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { title: SortDirection @@ -914,9 +864,10 @@ input MovieWhere { actors_SINGLE: PersonWhere "Return Movies where some of the related People match this filter" actors_SOME: PersonWhere - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } @@ -934,13 +885,6 @@ input PersonActedInMoviesConnectionWhere { node: MovieWhere } -input PersonOptions { - limit: Int - offset: Int - "Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PersonSort!] -} - "Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object." input PersonSort { name: SortDirection @@ -966,9 +910,10 @@ input PersonWhere { actedInMovies_SINGLE: MovieWhere "Return People where some of the related Movies match this filter" actedInMovies_SOME: MovieWhere - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } diff --git a/core/src/test/resources/tck-test-files/schema/v2/math.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/math.js.adoc index a484de6a..d4fe0475 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/math.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/math.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID viewers: Int! } @@ -32,15 +32,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -53,12 +44,14 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - viewers: Int + viewers: Int @deprecated(reason: "Please use the explicit _EQ version") + viewers_EQ: Int viewers_GT: Int viewers_GTE: Int viewers_IN: [Int!] @@ -81,8 +74,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" @@ -99,7 +92,7 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID viewers: BigInt! } @@ -127,15 +120,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -148,12 +132,14 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - viewers: BigInt + viewers: BigInt @deprecated(reason: "Please use the explicit _EQ version") + viewers_EQ: BigInt viewers_GT: BigInt viewers_GTE: BigInt viewers_IN: [BigInt!] @@ -176,8 +162,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" @@ -194,7 +180,7 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID viewers: Float! } @@ -217,15 +203,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -238,12 +215,14 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - viewers: Float + viewers: Float @deprecated(reason: "Please use the explicit _EQ version") + viewers_EQ: Float viewers_GT: Float viewers_GTE: Float viewers_IN: [Float!] @@ -266,8 +245,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" @@ -284,13 +263,13 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID viewers: Int! directedBy: Director @relationship(type: "DIRECTS", direction: IN) } -type Director { +type Director @node { lastName: String! directs: [Movie!]! @relationship(type: "DIRECTS", direction: OUT) } @@ -304,8 +283,8 @@ schema { } type Director { - directs(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - directsConnection(after: String, directed: Boolean = true, first: Int, sort: [DirectorDirectsConnectionSort!], where: DirectorDirectsConnectionWhere): DirectorDirectsConnection! + directs(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + directsConnection(after: String, first: Int, sort: [DirectorDirectsConnectionSort!], where: DirectorDirectsConnectionWhere): DirectorDirectsConnection! lastName: String! } @@ -336,15 +315,6 @@ type DirectorEdge { node: Director! } -input DirectorOptions { - limit: Int - offset: Int - """ - Specify one or more DirectorSort objects to sort Directors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [DirectorSort!] -} - """ Fields to sort Directors by. The order in which sorts are applied is not guaranteed when specifying many fields in one DirectorSort object. """ @@ -380,9 +350,10 @@ input DirectorWhere { directs_SINGLE: MovieWhere """Return Directors where some of the related Movies match this filter""" directs_SOME: MovieWhere - lastName: String + lastName: String @deprecated(reason: "Please use the explicit _EQ version") lastName_CONTAINS: String lastName_ENDS_WITH: String + lastName_EQ: String lastName_IN: [String!] lastName_STARTS_WITH: String } @@ -394,8 +365,8 @@ type DirectorsConnection { } type Movie { - directedBy(directed: Boolean = true, options: DirectorOptions, where: DirectorWhere): Director - directedByConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieDirectedByConnectionSort!], where: MovieDirectedByConnectionWhere): MovieDirectedByConnection! + directedBy(limit: Int, offset: Int, sort: [DirectorSort!], where: DirectorWhere): Director + directedByConnection(after: String, first: Int, sort: [MovieDirectedByConnectionSort!], where: MovieDirectedByConnectionWhere): MovieDirectedByConnection! id: ID viewers: Int! } @@ -427,15 +398,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -450,14 +412,14 @@ input MovieWhere { OR: [MovieWhere!] directedBy: DirectorWhere directedByConnection: MovieDirectedByConnectionWhere - directedByConnection_NOT: MovieDirectedByConnectionWhere - directedBy_NOT: DirectorWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - viewers: Int + viewers: Int @deprecated(reason: "Please use the explicit _EQ version") + viewers_EQ: Int viewers_GT: Int viewers_GTE: Int viewers_IN: [Int!] @@ -480,10 +442,10 @@ type PageInfo { } type Query { - directors(options: DirectorOptions, where: DirectorWhere): [Director!]! - directorsConnection(after: String, first: Int, sort: [DirectorSort], where: DirectorWhere): DirectorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + directors(limit: Int, offset: Int, sort: [DirectorSort!], where: DirectorWhere): [Director!]! + directorsConnection(after: String, first: Int, sort: [DirectorSort!], where: DirectorWhere): DirectorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" @@ -504,13 +466,13 @@ interface Production { viewers: Int! } -type Movie implements Production { +type Movie implements Production @node { id: ID viewers: Int! workers: [Person!]! @relationship(type: "WORKED_IN", direction: IN) } -type Person { +type Person @node { name: String! worksInProduction: [Production!]! @relationship(type: "WORKED_IN", direction: OUT) } @@ -526,8 +488,8 @@ schema { type Movie implements Production { id: ID viewers: Int! - workers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - workersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieWorkersConnectionSort!], where: MovieWorkersConnectionWhere): MovieWorkersConnection! + workers(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + workersConnection(after: String, first: Int, sort: [MovieWorkersConnectionSort!], where: MovieWorkersConnectionWhere): MovieWorkersConnection! } type MovieEdge { @@ -535,15 +497,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -556,12 +509,14 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - viewers: Int + viewers: Int @deprecated(reason: "Please use the explicit _EQ version") + viewers_EQ: Int viewers_GT: Int viewers_GTE: Int viewers_IN: [Int!] @@ -637,8 +592,8 @@ type PeopleConnection { type Person { name: String! - worksInProduction(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - worksInProductionConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonWorksInProductionConnectionSort!], where: PersonWorksInProductionConnectionWhere): PersonWorksInProductionConnection! + worksInProduction(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! + worksInProductionConnection(after: String, first: Int, sort: [PersonWorksInProductionConnectionSort!], where: PersonWorksInProductionConnectionWhere): PersonWorksInProductionConnection! } type PersonEdge { @@ -646,15 +601,6 @@ type PersonEdge { node: Person! } -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort!] -} - """ Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. """ @@ -666,9 +612,10 @@ input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String """ @@ -732,15 +679,6 @@ enum ProductionImplementation { Movie } -input ProductionOptions { - limit: Int - offset: Int - """ - Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ProductionSort] -} - """ Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. """ @@ -752,8 +690,9 @@ input ProductionWhere { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] - typename_IN: [ProductionImplementation!] - viewers: Int + typename: [ProductionImplementation!] + viewers: Int @deprecated(reason: "Please use the explicit _EQ version") + viewers_EQ: Int viewers_GT: Int viewers_GTE: Int viewers_IN: [Int!] @@ -768,12 +707,12 @@ type ProductionsConnection { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! + productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! + productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! } """An enum for sorting in either ascending or descending order.""" @@ -790,12 +729,12 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Person { +type Person @node { name: String! actedInMovies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } -type Movie { +type Movie @node { title: String! actors: [Person!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } @@ -832,19 +771,21 @@ input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - pay: Float + pay: Float @deprecated(reason: "Please use the explicit _EQ version") + pay_EQ: Float pay_GT: Float pay_GTE: Float pay_IN: [Float] pay_LT: Float pay_LTE: Float - roles: [String!] + roles: [String!] @deprecated(reason: "Please use the explicit _EQ version") + roles_EQ: [String!] roles_INCLUDES: String } type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String! } @@ -878,15 +819,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -922,9 +854,10 @@ input MovieWhere { actors_SINGLE: PersonWhere """Return Movies where some of the related People match this filter""" actors_SOME: PersonWhere - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } @@ -950,8 +883,8 @@ type PeopleConnection { } type Person { - actedInMovies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInMoviesConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonActedInMoviesConnectionSort!], where: PersonActedInMoviesConnectionWhere): PersonActedInMoviesConnection! + actedInMovies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + actedInMoviesConnection(after: String, first: Int, sort: [PersonActedInMoviesConnectionSort!], where: PersonActedInMoviesConnectionWhere): PersonActedInMoviesConnection! name: String! } @@ -985,15 +918,6 @@ type PersonEdge { node: Person! } -input PersonOptions { - limit: Int - offset: Int - """ - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PersonSort!] -} - """ Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. """ @@ -1029,18 +953,19 @@ input PersonWhere { actedInMovies_SINGLE: MovieWhere """Return People where some of the related Movies match this filter""" actedInMovies_SOME: MovieWhere - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! + peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/nested-aggregation-on-type.adoc b/core/src/test/resources/tck-test-files/schema/v2/nested-aggregation-on-type.adoc index 114ee945..75d868db 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/nested-aggregation-on-type.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/nested-aggregation-on-type.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! cost: Float! runtime: Int! @@ -18,7 +18,7 @@ type ActedIn @relationshipProperties { screenTime: Int! } -type Actor { +type Actor @node { name: String! actedIn: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } @@ -40,8 +40,8 @@ type ActedIn { } type Actor { - actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -94,10 +94,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -116,7 +116,8 @@ input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - screenTime: Int + screenTime: Int @deprecated(reason : "Please use the explicit _EQ version") + screenTime_EQ: Int screenTime_GT: Int screenTime_GTE: Int screenTime_IN: [Int!] @@ -137,13 +138,6 @@ input ActorActedInConnectionWhere { node: MovieWhere } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { name: SortDirection @@ -169,20 +163,14 @@ input ActorWhere { actedIn_SINGLE: MovieWhere "Return Actors where some of the related Movies match this filter" actedIn_SOME: MovieWhere - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { cost: SortDirection @@ -194,21 +182,24 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - cost: Float + cost: Float @deprecated(reason : "Please use the explicit _EQ version") + cost_EQ: Float cost_GT: Float cost_GTE: Float cost_IN: [Float!] cost_LT: Float cost_LTE: Float - runtime: Int + runtime: Int @deprecated(reason : "Please use the explicit _EQ version") + runtime_EQ: Int runtime_GT: Int runtime_GTE: Int runtime_IN: [Int!] runtime_LT: Int runtime_LTE: Int - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } diff --git a/core/src/test/resources/tck-test-files/schema/v2/nested-aggregation-on-type.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/nested-aggregation-on-type.js.adoc index 41985694..2797d7fe 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/nested-aggregation-on-type.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/nested-aggregation-on-type.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String! cost: Float! runtime: Int! @@ -19,7 +19,7 @@ type ActedIn @relationshipProperties { screenTime: Int! } -type Actor { +type Actor @node { name: String! actedIn: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } @@ -48,7 +48,8 @@ input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - screenTime: Int + screenTime: Int @deprecated(reason: "Please use the explicit _EQ version") + screenTime_EQ: Int screenTime_GT: Int screenTime_GTE: Int screenTime_IN: [Int!] @@ -57,8 +58,8 @@ input ActedInWhere { } type Actor { - actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -92,15 +93,6 @@ type ActorEdge { node: Actor! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -136,9 +128,10 @@ input ActorWhere { actedIn_SINGLE: MovieWhere """Return Actors where some of the related Movies match this filter""" actedIn_SOME: MovieWhere - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } @@ -160,15 +153,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -182,21 +166,24 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - cost: Float + cost: Float @deprecated(reason: "Please use the explicit _EQ version") + cost_EQ: Float cost_GT: Float cost_GTE: Float cost_IN: [Float!] cost_LT: Float cost_LTE: Float - runtime: Int + runtime: Int @deprecated(reason: "Please use the explicit _EQ version") + runtime_EQ: Int runtime_GT: Int runtime_GTE: Int runtime_IN: [Int!] runtime_LT: Int runtime_LTE: Int - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } @@ -216,10 +203,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/null.adoc b/core/src/test/resources/tck-test-files/schema/v2/null.adoc index 61f8e851..be906561 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/null.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/null.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID! ids: [ID!]! name: String! @@ -99,8 +99,8 @@ type Point { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -114,13 +114,6 @@ enum SortDirection { "A date and time, represented as an ISO-8601 string" scalar DateTime -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { actorCount: SortDirection @@ -135,53 +128,66 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - actorCount: Int + actorCount: Int @deprecated(reason : "Please use the explicit _EQ version") + actorCount_EQ: Int actorCount_GT: Int actorCount_GTE: Int actorCount_IN: [Int!] actorCount_LT: Int actorCount_LTE: Int - actorCounts: [Int!] + actorCounts: [Int!] @deprecated(reason : "Please use the explicit _EQ version") + actorCounts_EQ: [Int!] actorCounts_INCLUDES: Int - averageRating: Float + averageRating: Float @deprecated(reason : "Please use the explicit _EQ version") + averageRating_EQ: Float averageRating_GT: Float averageRating_GTE: Float averageRating_IN: [Float!] averageRating_LT: Float averageRating_LTE: Float - averageRatings: [Float!] + averageRatings: [Float!] @deprecated(reason : "Please use the explicit _EQ version") + averageRatings_EQ: [Float!] averageRatings_INCLUDES: Float - createdAt: DateTime + createdAt: DateTime @deprecated(reason : "Please use the explicit _EQ version") + createdAt_EQ: DateTime createdAt_GT: DateTime createdAt_GTE: DateTime createdAt_IN: [DateTime!] createdAt_LT: DateTime createdAt_LTE: DateTime - createdAts: [DateTime!] + createdAts: [DateTime!] @deprecated(reason : "Please use the explicit _EQ version") + createdAts_EQ: [DateTime!] createdAts_INCLUDES: DateTime - filmedAt: PointInput + filmedAt: PointInput @deprecated(reason : "Please use the explicit _EQ version") filmedAt_DISTANCE: PointDistance + filmedAt_EQ: PointInput filmedAt_GT: PointDistance filmedAt_GTE: PointDistance filmedAt_IN: [PointInput!] filmedAt_LT: PointDistance filmedAt_LTE: PointDistance - filmedAts: [PointInput!] + filmedAts: [PointInput!] @deprecated(reason : "Please use the explicit _EQ version") + filmedAts_EQ: [PointInput!] filmedAts_INCLUDES: PointInput - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID!] id_STARTS_WITH: ID - ids: [ID!] + ids: [ID!] @deprecated(reason : "Please use the explicit _EQ version") + ids_EQ: [ID!] ids_INCLUDES: ID - isActives: [Boolean!] - name: String + isActives: [Boolean!] @deprecated(reason : "Please use the explicit _EQ version") + isActives_EQ: [Boolean!] + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String - names: [String!] + names: [String!] @deprecated(reason : "Please use the explicit _EQ version") + names_EQ: [String!] names_INCLUDES: String } diff --git a/core/src/test/resources/tck-test-files/schema/v2/null.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/null.js.adoc index 586daa5e..dc89350f 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/null.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/null.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID! ids: [ID!]! name: String! @@ -57,15 +57,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -82,53 +73,66 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - actorCount: Int + actorCount: Int @deprecated(reason: "Please use the explicit _EQ version") + actorCount_EQ: Int actorCount_GT: Int actorCount_GTE: Int actorCount_IN: [Int!] actorCount_LT: Int actorCount_LTE: Int - actorCounts: [Int!] + actorCounts: [Int!] @deprecated(reason: "Please use the explicit _EQ version") + actorCounts_EQ: [Int!] actorCounts_INCLUDES: Int - averageRating: Float + averageRating: Float @deprecated(reason: "Please use the explicit _EQ version") + averageRating_EQ: Float averageRating_GT: Float averageRating_GTE: Float averageRating_IN: [Float!] averageRating_LT: Float averageRating_LTE: Float - averageRatings: [Float!] + averageRatings: [Float!] @deprecated(reason: "Please use the explicit _EQ version") + averageRatings_EQ: [Float!] averageRatings_INCLUDES: Float - createdAt: DateTime + createdAt: DateTime @deprecated(reason: "Please use the explicit _EQ version") + createdAt_EQ: DateTime createdAt_GT: DateTime createdAt_GTE: DateTime createdAt_IN: [DateTime!] createdAt_LT: DateTime createdAt_LTE: DateTime - createdAts: [DateTime!] + createdAts: [DateTime!] @deprecated(reason: "Please use the explicit _EQ version") + createdAts_EQ: [DateTime!] createdAts_INCLUDES: DateTime - filmedAt: PointInput + filmedAt: PointInput @deprecated(reason: "Please use the explicit _EQ version") filmedAt_DISTANCE: PointDistance + filmedAt_EQ: PointInput filmedAt_GT: PointDistance filmedAt_GTE: PointDistance filmedAt_IN: [PointInput!] filmedAt_LT: PointDistance filmedAt_LTE: PointDistance - filmedAts: [PointInput!] + filmedAts: [PointInput!] @deprecated(reason: "Please use the explicit _EQ version") + filmedAts_EQ: [PointInput!] filmedAts_INCLUDES: PointInput - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID!] id_STARTS_WITH: ID - ids: [ID!] + ids: [ID!] @deprecated(reason: "Please use the explicit _EQ version") + ids_EQ: [ID!] ids_INCLUDES: ID - isActives: [Boolean!] - name: String + isActives: [Boolean!] @deprecated(reason: "Please use the explicit _EQ version") + isActives_EQ: [Boolean!] + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String - names: [String!] + names: [String!] @deprecated(reason: "Please use the explicit _EQ version") + names_EQ: [String!] names_INCLUDES: String } @@ -205,8 +209,8 @@ input PointInput { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/pluralize-consistency.adoc b/core/src/test/resources/tck-test-files/schema/v2/pluralize-consistency.adoc index c10bc7dd..a0f8dccf 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/pluralize-consistency.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/pluralize-consistency.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type super_user { +type super_user @node { name: String! my_friend: [super_friend!]! @relationship(type: "FRIEND", direction: OUT) } -type super_friend { +type super_friend @node { name: String! } ---- @@ -34,10 +34,10 @@ type PageInfo { } type Query { - superFriends(options: super_friendOptions, where: super_friendWhere): [super_friend!]! - superFriendsConnection(after: String, first: Int, sort: [super_friendSort], where: super_friendWhere): SuperFriendsConnection! - superUsers(options: super_userOptions, where: super_userWhere): [super_user!]! - superUsersConnection(after: String, first: Int, sort: [super_userSort], where: super_userWhere): SuperUsersConnection! + superFriends(limit: Int, offset: Int, sort: [super_friendSort!], where: super_friendWhere): [super_friend!]! + superFriendsConnection(after: String, first: Int, sort: [super_friendSort!], where: super_friendWhere): SuperFriendsConnection! + superUsers(limit: Int, offset: Int, sort: [super_userSort!], where: super_userWhere): [super_user!]! + superUsersConnection(after: String, first: Int, sort: [super_userSort!], where: super_userWhere): SuperUsersConnection! } type SuperFriendsConnection { @@ -62,8 +62,8 @@ type super_friendEdge { } type super_user { - my_friend(directed: Boolean = true, options: super_friendOptions, where: super_friendWhere): [super_friend!]! - my_friendConnection(after: String, directed: Boolean = true, first: Int, sort: [super_userMy_friendConnectionSort!], where: super_userMy_friendConnectionWhere): super_userMy_friendConnection! + my_friend(limit: Int, offset: Int, sort: [super_friendSort!], where: super_friendWhere): [super_friend!]! + my_friendConnection(after: String, first: Int, sort: [super_userMy_friendConnectionSort!], where: super_userMy_friendConnectionWhere): super_userMy_friendConnection! name: String! } @@ -91,13 +91,6 @@ enum SortDirection { DESC } -input super_friendOptions { - limit: Int - offset: Int - "Specify one or more super_friendSort objects to sort SuperFriends by. The sorts will be applied in the order in which they are arranged in the array." - sort: [super_friendSort!] -} - "Fields to sort SuperFriends by. The order in which sorts are applied is not guaranteed when specifying many fields in one super_friendSort object." input super_friendSort { name: SortDirection @@ -107,9 +100,10 @@ input super_friendWhere { AND: [super_friendWhere!] NOT: super_friendWhere OR: [super_friendWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } @@ -125,13 +119,6 @@ input super_userMy_friendConnectionWhere { node: super_friendWhere } -input super_userOptions { - limit: Int - offset: Int - "Specify one or more super_userSort objects to sort SuperUsers by. The sorts will be applied in the order in which they are arranged in the array." - sort: [super_userSort!] -} - "Fields to sort SuperUsers by. The order in which sorts are applied is not guaranteed when specifying many fields in one super_userSort object." input super_userSort { name: SortDirection @@ -157,9 +144,10 @@ input super_userWhere { my_friend_SINGLE: super_friendWhere "Return super_users where some of the related super_friends match this filter" my_friend_SOME: super_friendWhere - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } diff --git a/core/src/test/resources/tck-test-files/schema/v2/pluralize-consistency.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/pluralize-consistency.js.adoc index 34aa134d..a4d7e192 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/pluralize-consistency.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/pluralize-consistency.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type super_user { +type super_user @node { name: String! my_friend: [super_friend!]! @relationship(type: "FRIEND", direction: OUT) } -type super_friend { +type super_friend @node { name: String! } ---- @@ -35,10 +35,10 @@ type PageInfo { } type Query { - superFriends(options: super_friendOptions, where: super_friendWhere): [super_friend!]! - superFriendsConnection(after: String, first: Int, sort: [super_friendSort], where: super_friendWhere): SuperFriendsConnection! - superUsers(options: super_userOptions, where: super_userWhere): [super_user!]! - superUsersConnection(after: String, first: Int, sort: [super_userSort], where: super_userWhere): SuperUsersConnection! + superFriends(limit: Int, offset: Int, sort: [super_friendSort!], where: super_friendWhere): [super_friend!]! + superFriendsConnection(after: String, first: Int, sort: [super_friendSort!], where: super_friendWhere): SuperFriendsConnection! + superUsers(limit: Int, offset: Int, sort: [super_userSort!], where: super_userWhere): [super_user!]! + superUsersConnection(after: String, first: Int, sort: [super_userSort!], where: super_userWhere): SuperUsersConnection! } """An enum for sorting in either ascending or descending order.""" @@ -70,15 +70,6 @@ type super_friendEdge { node: super_friend! } -input super_friendOptions { - limit: Int - offset: Int - """ - Specify one or more super_friendSort objects to sort SuperFriends by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [super_friendSort!] -} - """ Fields to sort SuperFriends by. The order in which sorts are applied is not guaranteed when specifying many fields in one super_friendSort object. """ @@ -90,16 +81,17 @@ input super_friendWhere { AND: [super_friendWhere!] NOT: super_friendWhere OR: [super_friendWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } type super_user { - my_friend(directed: Boolean = true, options: super_friendOptions, where: super_friendWhere): [super_friend!]! - my_friendConnection(after: String, directed: Boolean = true, first: Int, sort: [super_userMy_friendConnectionSort!], where: super_userMy_friendConnectionWhere): super_userMy_friendConnection! + my_friend(limit: Int, offset: Int, sort: [super_friendSort!], where: super_friendWhere): [super_friend!]! + my_friendConnection(after: String, first: Int, sort: [super_userMy_friendConnectionSort!], where: super_userMy_friendConnectionWhere): super_userMy_friendConnection! name: String! } @@ -130,15 +122,6 @@ type super_userMy_friendRelationship { node: super_friend! } -input super_userOptions { - limit: Int - offset: Int - """ - Specify one or more super_userSort objects to sort SuperUsers by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [super_userSort!] -} - """ Fields to sort SuperUsers by. The order in which sorts are applied is not guaranteed when specifying many fields in one super_userSort object. """ @@ -182,9 +165,10 @@ input super_userWhere { Return super_users where some of the related super_friends match this filter """ my_friend_SOME: super_friendWhere - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } diff --git a/core/src/test/resources/tck-test-files/schema/v2/query-direction.adoc b/core/src/test/resources/tck-test-files/schema/v2/query-direction.adoc index 22101d73..8eeaf2a5 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/query-direction.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/query-direction.adoc @@ -3,14 +3,14 @@ = Query Direction -== DEFAULT_UNDIRECTED +== DIRECTED .Schema [source,graphql,schema=true] ---- -type User { +type User @node { name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DEFAULT_UNDIRECTED) + friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DIRECTED) } ---- @@ -30,131 +30,12 @@ type PageInfo { } type Query { - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! + users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! + usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } type User { - friends(directed: Boolean = false, options: UserOptions, where: UserWhere): [User!]! - friendsConnection(after: String, directed: Boolean = false, first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! - name: String! -} - -type UserEdge { - cursor: String! - node: User! -} - -type UserFriendsConnection { - edges: [UserFriendsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type UserFriendsRelationship { - cursor: String! - node: User! -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -input UserFriendsConnectionSort { - node: UserSort -} - -input UserFriendsConnectionWhere { - AND: [UserFriendsConnectionWhere!] - NOT: UserFriendsConnectionWhere - OR: [UserFriendsConnectionWhere!] - node: UserWhere -} - -input UserOptions { - limit: Int - offset: Int - "Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array." - sort: [UserSort!] -} - -"Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object." -input UserSort { - name: SortDirection -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - "Return Users where all of the related UserFriendsConnections match this filter" - friendsConnection_ALL: UserFriendsConnectionWhere - "Return Users where none of the related UserFriendsConnections match this filter" - friendsConnection_NONE: UserFriendsConnectionWhere - "Return Users where one of the related UserFriendsConnections match this filter" - friendsConnection_SINGLE: UserFriendsConnectionWhere - "Return Users where some of the related UserFriendsConnections match this filter" - friendsConnection_SOME: UserFriendsConnectionWhere - "Return Users where all of the related Users match this filter" - friends_ALL: UserWhere - "Return Users where none of the related Users match this filter" - friends_NONE: UserWhere - "Return Users where one of the related Users match this filter" - friends_SINGLE: UserWhere - "Return Users where some of the related Users match this filter" - friends_SOME: UserWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_STARTS_WITH: String -} - ----- - -== DIRECTED_ONLY - -.Schema -[source,graphql,schema=true] ----- -type User { - name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DIRECTED_ONLY) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -type User { - friends(options: UserOptions, where: UserWhere): [User!]! + friends(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! friendsConnection(after: String, first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! name: String! } @@ -200,13 +81,6 @@ input UserFriendsConnectionWhere { node: UserWhere } -input UserOptions { - limit: Int - offset: Int - "Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array." - sort: [UserSort!] -} - "Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object." input UserSort { name: SortDirection @@ -232,23 +106,24 @@ input UserWhere { friends_SINGLE: UserWhere "Return Users where some of the related Users match this filter" friends_SOME: UserWhere - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } ---- -== UNDIRECTED_ONLY +== UNDIRECTED .Schema [source,graphql,schema=true] ---- -type User { +type User @node { name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: UNDIRECTED_ONLY) + friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: UNDIRECTED) } ---- @@ -268,12 +143,12 @@ type PageInfo { } type Query { - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! + users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! + usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } type User { - friends(options: UserOptions, where: UserWhere): [User!]! + friends(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! friendsConnection(after: String, first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! name: String! } @@ -319,13 +194,6 @@ input UserFriendsConnectionWhere { node: UserWhere } -input UserOptions { - limit: Int - offset: Int - "Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array." - sort: [UserSort!] -} - "Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object." input UserSort { name: SortDirection @@ -351,9 +219,10 @@ input UserWhere { friends_SINGLE: UserWhere "Return Users where some of the related Users match this filter" friends_SOME: UserWhere - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } diff --git a/core/src/test/resources/tck-test-files/schema/v2/query-direction.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/query-direction.js.adoc index 74a5a1b8..cdf4515f 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/query-direction.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/query-direction.js.adoc @@ -4,144 +4,14 @@ = Query Direction -== DEFAULT_UNDIRECTED +== DIRECTED .Schema [source,graphql,schema=true] ---- -type User { - name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DEFAULT_UNDIRECTED) -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} - -type User { - friends(directed: Boolean = false, options: UserOptions, where: UserWhere): [User!]! - friendsConnection(after: String, directed: Boolean = false, first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! - name: String! -} - -type UserEdge { - cursor: String! - node: User! -} - -type UserFriendsConnection { - edges: [UserFriendsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input UserFriendsConnectionSort { - node: UserSort -} - -input UserFriendsConnectionWhere { - AND: [UserFriendsConnectionWhere!] - NOT: UserFriendsConnectionWhere - OR: [UserFriendsConnectionWhere!] - node: UserWhere -} - -type UserFriendsRelationship { - cursor: String! - node: User! -} - -input UserOptions { - limit: Int - offset: Int - """ - Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [UserSort!] -} - -""" -Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. -""" -input UserSort { - name: SortDirection -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - """ - Return Users where all of the related UserFriendsConnections match this filter - """ - friendsConnection_ALL: UserFriendsConnectionWhere - """ - Return Users where none of the related UserFriendsConnections match this filter - """ - friendsConnection_NONE: UserFriendsConnectionWhere - """ - Return Users where one of the related UserFriendsConnections match this filter - """ - friendsConnection_SINGLE: UserFriendsConnectionWhere - """ - Return Users where some of the related UserFriendsConnections match this filter - """ - friendsConnection_SOME: UserFriendsConnectionWhere - """Return Users where all of the related Users match this filter""" - friends_ALL: UserWhere - """Return Users where none of the related Users match this filter""" - friends_NONE: UserWhere - """Return Users where one of the related Users match this filter""" - friends_SINGLE: UserWhere - """Return Users where some of the related Users match this filter""" - friends_SOME: UserWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_STARTS_WITH: String -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} ----- - -== DIRECTED_ONLY - -.Schema -[source,graphql,schema=true] ----- -type User { +type User @node { name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DIRECTED_ONLY) + friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DIRECTED) } ---- @@ -161,8 +31,8 @@ type PageInfo { } type Query { - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! + users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! + usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } """An enum for sorting in either ascending or descending order.""" @@ -174,7 +44,7 @@ enum SortDirection { } type User { - friends(options: UserOptions, where: UserWhere): [User!]! + friends(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! friendsConnection(after: String, first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! name: String! } @@ -206,15 +76,6 @@ type UserFriendsRelationship { node: User! } -input UserOptions { - limit: Int - offset: Int - """ - Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [UserSort!] -} - """ Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. """ @@ -250,9 +111,10 @@ input UserWhere { friends_SINGLE: UserWhere """Return Users where some of the related Users match this filter""" friends_SOME: UserWhere - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } @@ -264,14 +126,14 @@ type UsersConnection { } ---- -== UNDIRECTED_ONLY +== UNDIRECTED .Schema [source,graphql,schema=true] ---- -type User { +type User @node { name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: UNDIRECTED_ONLY) + friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: UNDIRECTED) } ---- @@ -291,8 +153,8 @@ type PageInfo { } type Query { - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! + users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! + usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } """An enum for sorting in either ascending or descending order.""" @@ -304,7 +166,7 @@ enum SortDirection { } type User { - friends(options: UserOptions, where: UserWhere): [User!]! + friends(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! friendsConnection(after: String, first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! name: String! } @@ -336,15 +198,6 @@ type UserFriendsRelationship { node: User! } -input UserOptions { - limit: Int - offset: Int - """ - Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [UserSort!] -} - """ Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. """ @@ -380,9 +233,10 @@ input UserWhere { friends_SINGLE: UserWhere """Return Users where some of the related Users match this filter""" friends_SOME: UserWhere - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } diff --git a/core/src/test/resources/tck-test-files/schema/v2/remove-deprecated/aggregations.adoc b/core/src/test/resources/tck-test-files/schema/v2/remove-deprecated/aggregations.adoc deleted file mode 100644 index d8dd5127..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/remove-deprecated/aggregations.adoc +++ /dev/null @@ -1,559 +0,0 @@ -:toc: -:toclevels: 42 - -= Remove deprecated fields for aggregations - -== Top Level Aggregations - -.Schema -[source,graphql,schema=true] ----- -type Movie { - id: ID - isbn: String! - title: String - createdAt: DateTime - someTime: Time - someLocalTime: LocalTime - someLocalDateTime: LocalDateTime - imdbRating: Float - someInt: Int - someBigInt: BigInt - screenTime: Duration -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -type Movie { - createdAt: DateTime - id: ID - imdbRating: Float - isbn: String! - screenTime: Duration - someBigInt: BigInt - someInt: Int - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someTime: Time - title: String -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -"A BigInt value up to 64 bits in size, which can be a number or a string if used inline, or a string only if used as a variable. Always returned as a string." -scalar BigInt - -"A date and time, represented as an ISO-8601 string" -scalar DateTime - -"A duration, represented as an ISO 8601 duration string" -scalar Duration - -"A local datetime, represented as 'YYYY-MM-DDTHH:MM:SS'" -scalar LocalDateTime - -"A local time, represented as a time string without timezone information" -scalar LocalTime - -"A time, represented as an RFC3339 time string" -scalar Time - -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - -"Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." -input MovieSort { - createdAt: SortDirection - id: SortDirection - imdbRating: SortDirection - isbn: SortDirection - screenTime: SortDirection - someBigInt: SortDirection - someInt: SortDirection - someLocalDateTime: SortDirection - someLocalTime: SortDirection - someTime: SortDirection - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - createdAt: DateTime - createdAt_GT: DateTime - createdAt_GTE: DateTime - createdAt_IN: [DateTime] - createdAt_LT: DateTime - createdAt_LTE: DateTime - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - imdbRating: Float - imdbRating_GT: Float - imdbRating_GTE: Float - imdbRating_IN: [Float] - imdbRating_LT: Float - imdbRating_LTE: Float - isbn: String - isbn_CONTAINS: String - isbn_ENDS_WITH: String - isbn_IN: [String!] - isbn_STARTS_WITH: String - screenTime: Duration - screenTime_GT: Duration - screenTime_GTE: Duration - screenTime_IN: [Duration] - screenTime_LT: Duration - screenTime_LTE: Duration - someBigInt: BigInt - someBigInt_GT: BigInt - someBigInt_GTE: BigInt - someBigInt_IN: [BigInt] - someBigInt_LT: BigInt - someBigInt_LTE: BigInt - someInt: Int - someInt_GT: Int - someInt_GTE: Int - someInt_IN: [Int] - someInt_LT: Int - someInt_LTE: Int - someLocalDateTime: LocalDateTime - someLocalDateTime_GT: LocalDateTime - someLocalDateTime_GTE: LocalDateTime - someLocalDateTime_IN: [LocalDateTime] - someLocalDateTime_LT: LocalDateTime - someLocalDateTime_LTE: LocalDateTime - someLocalTime: LocalTime - someLocalTime_GT: LocalTime - someLocalTime_GTE: LocalTime - someLocalTime_IN: [LocalTime] - someLocalTime_LT: LocalTime - someLocalTime_LTE: LocalTime - someTime: Time - someTime_GT: Time - someTime_GTE: Time - someTime_IN: [Time] - someTime_LT: Time - someTime_LTE: Time - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - ----- - -== Where Level Aggregations - -.Schema -[source,graphql,schema=true] ----- -type User { - someId: ID - someString: String - someFloat: Float - someInt: Int - someBigInt: BigInt - someDateTime: DateTime - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someTime: Time - someDuration: Duration -} - -type Post { - title: String - likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") -} - -type Likes @relationshipProperties { - someId: ID - someString: String - someFloat: Float - someInt: Int - someBigInt: BigInt - someDateTime: DateTime - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someTime: Time - someDuration: Duration -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -""" -The edge properties for the following fields: -* Post.likes -""" -type Likes { - someBigInt: BigInt - someDateTime: DateTime - someDuration: Duration - someFloat: Float - someId: ID - someInt: Int - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someString: String - someTime: Time -} - -"Pagination information (Relay)" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Post { - likes(directed: Boolean = true, options: UserOptions, where: UserWhere): [User!]! - likesConnection(after: String, directed: Boolean = true, first: Int, sort: [PostLikesConnectionSort!], where: PostLikesConnectionWhere): PostLikesConnection! - title: String -} - -type PostEdge { - cursor: String! - node: Post! -} - -type PostLikesConnection { - edges: [PostLikesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PostLikesRelationship { - cursor: String! - node: User! - properties: Likes! -} - -type PostsConnection { - edges: [PostEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - posts(options: PostOptions, where: PostWhere): [Post!]! - postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -type User { - someBigInt: BigInt - someDateTime: DateTime - someDuration: Duration - someFloat: Float - someId: ID - someInt: Int - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someString: String - someTime: Time -} - -type UserEdge { - cursor: String! - node: User! -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"An enum for sorting in either ascending or descending order." -enum SortDirection { - "Sort by field values in ascending order." - ASC - "Sort by field values in descending order." - DESC -} - -"A BigInt value up to 64 bits in size, which can be a number or a string if used inline, or a string only if used as a variable. Always returned as a string." -scalar BigInt - -"A date and time, represented as an ISO-8601 string" -scalar DateTime - -"A duration, represented as an ISO 8601 duration string" -scalar Duration - -"A local datetime, represented as 'YYYY-MM-DDTHH:MM:SS'" -scalar LocalDateTime - -"A local time, represented as a time string without timezone information" -scalar LocalTime - -"A time, represented as an RFC3339 time string" -scalar Time - -input LikesSort { - someBigInt: SortDirection - someDateTime: SortDirection - someDuration: SortDirection - someFloat: SortDirection - someId: SortDirection - someInt: SortDirection - someLocalDateTime: SortDirection - someLocalTime: SortDirection - someString: SortDirection - someTime: SortDirection -} - -input LikesWhere { - AND: [LikesWhere!] - NOT: LikesWhere - OR: [LikesWhere!] - someBigInt: BigInt - someBigInt_GT: BigInt - someBigInt_GTE: BigInt - someBigInt_IN: [BigInt] - someBigInt_LT: BigInt - someBigInt_LTE: BigInt - someDateTime: DateTime - someDateTime_GT: DateTime - someDateTime_GTE: DateTime - someDateTime_IN: [DateTime] - someDateTime_LT: DateTime - someDateTime_LTE: DateTime - someDuration: Duration - someDuration_GT: Duration - someDuration_GTE: Duration - someDuration_IN: [Duration] - someDuration_LT: Duration - someDuration_LTE: Duration - someFloat: Float - someFloat_GT: Float - someFloat_GTE: Float - someFloat_IN: [Float] - someFloat_LT: Float - someFloat_LTE: Float - someId: ID - someId_CONTAINS: ID - someId_ENDS_WITH: ID - someId_IN: [ID] - someId_STARTS_WITH: ID - someInt: Int - someInt_GT: Int - someInt_GTE: Int - someInt_IN: [Int] - someInt_LT: Int - someInt_LTE: Int - someLocalDateTime: LocalDateTime - someLocalDateTime_GT: LocalDateTime - someLocalDateTime_GTE: LocalDateTime - someLocalDateTime_IN: [LocalDateTime] - someLocalDateTime_LT: LocalDateTime - someLocalDateTime_LTE: LocalDateTime - someLocalTime: LocalTime - someLocalTime_GT: LocalTime - someLocalTime_GTE: LocalTime - someLocalTime_IN: [LocalTime] - someLocalTime_LT: LocalTime - someLocalTime_LTE: LocalTime - someString: String - someString_CONTAINS: String - someString_ENDS_WITH: String - someString_IN: [String] - someString_STARTS_WITH: String - someTime: Time - someTime_GT: Time - someTime_GTE: Time - someTime_IN: [Time] - someTime_LT: Time - someTime_LTE: Time -} - -input PostLikesConnectionSort { - edge: LikesSort - node: UserSort -} - -input PostLikesConnectionWhere { - AND: [PostLikesConnectionWhere!] - NOT: PostLikesConnectionWhere - OR: [PostLikesConnectionWhere!] - edge: LikesWhere - node: UserWhere -} - -input PostOptions { - limit: Int - offset: Int - "Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array." - sort: [PostSort!] -} - -"Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object." -input PostSort { - title: SortDirection -} - -input PostWhere { - AND: [PostWhere!] - NOT: PostWhere - OR: [PostWhere!] - "Return Posts where all of the related PostLikesConnections match this filter" - likesConnection_ALL: PostLikesConnectionWhere - "Return Posts where none of the related PostLikesConnections match this filter" - likesConnection_NONE: PostLikesConnectionWhere - "Return Posts where one of the related PostLikesConnections match this filter" - likesConnection_SINGLE: PostLikesConnectionWhere - "Return Posts where some of the related PostLikesConnections match this filter" - likesConnection_SOME: PostLikesConnectionWhere - "Return Posts where all of the related Users match this filter" - likes_ALL: UserWhere - "Return Posts where none of the related Users match this filter" - likes_NONE: UserWhere - "Return Posts where one of the related Users match this filter" - likes_SINGLE: UserWhere - "Return Posts where some of the related Users match this filter" - likes_SOME: UserWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - -input UserOptions { - limit: Int - offset: Int - "Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array." - sort: [UserSort!] -} - -"Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object." -input UserSort { - someBigInt: SortDirection - someDateTime: SortDirection - someDuration: SortDirection - someFloat: SortDirection - someId: SortDirection - someInt: SortDirection - someLocalDateTime: SortDirection - someLocalTime: SortDirection - someString: SortDirection - someTime: SortDirection -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - someBigInt: BigInt - someBigInt_GT: BigInt - someBigInt_GTE: BigInt - someBigInt_IN: [BigInt] - someBigInt_LT: BigInt - someBigInt_LTE: BigInt - someDateTime: DateTime - someDateTime_GT: DateTime - someDateTime_GTE: DateTime - someDateTime_IN: [DateTime] - someDateTime_LT: DateTime - someDateTime_LTE: DateTime - someDuration: Duration - someDuration_GT: Duration - someDuration_GTE: Duration - someDuration_IN: [Duration] - someDuration_LT: Duration - someDuration_LTE: Duration - someFloat: Float - someFloat_GT: Float - someFloat_GTE: Float - someFloat_IN: [Float] - someFloat_LT: Float - someFloat_LTE: Float - someId: ID - someId_CONTAINS: ID - someId_ENDS_WITH: ID - someId_IN: [ID] - someId_STARTS_WITH: ID - someInt: Int - someInt_GT: Int - someInt_GTE: Int - someInt_IN: [Int] - someInt_LT: Int - someInt_LTE: Int - someLocalDateTime: LocalDateTime - someLocalDateTime_GT: LocalDateTime - someLocalDateTime_GTE: LocalDateTime - someLocalDateTime_IN: [LocalDateTime] - someLocalDateTime_LT: LocalDateTime - someLocalDateTime_LTE: LocalDateTime - someLocalTime: LocalTime - someLocalTime_GT: LocalTime - someLocalTime_GTE: LocalTime - someLocalTime_IN: [LocalTime] - someLocalTime_LT: LocalTime - someLocalTime_LTE: LocalTime - someString: String - someString_CONTAINS: String - someString_ENDS_WITH: String - someString_IN: [String] - someString_STARTS_WITH: String - someTime: Time - someTime_GT: Time - someTime_GTE: Time - someTime_IN: [Time] - someTime_LT: Time - someTime_LTE: Time -} - ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/remove-deprecated/aggregations.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/remove-deprecated/aggregations.js.adoc deleted file mode 100644 index 88e959bc..00000000 --- a/core/src/test/resources/tck-test-files/schema/v2/remove-deprecated/aggregations.js.adoc +++ /dev/null @@ -1,586 +0,0 @@ -// This file was generated by the Test-Case extractor of neo4j-graphql -:toc: -:toclevels: 42 - -= Remove deprecated fields for aggregations - -== Top Level Aggregations - -.Schema -[source,graphql,schema=true] ----- -type Movie { - id: ID - isbn: String! - title: String - createdAt: DateTime - someTime: Time - someLocalTime: LocalTime - someLocalDateTime: LocalDateTime - imdbRating: Float - someInt: Int - someBigInt: BigInt - screenTime: Duration -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -""" -A BigInt value up to 64 bits in size, which can be a number or a string if used inline, or a string only if used as a variable. Always returned as a string. -""" -scalar BigInt - -"""A date and time, represented as an ISO-8601 string""" -scalar DateTime - -"""A duration, represented as an ISO 8601 duration string""" -scalar Duration - -"""A local datetime, represented as 'YYYY-MM-DDTHH:MM:SS'""" -scalar LocalDateTime - -""" -A local time, represented as a time string without timezone information -""" -scalar LocalTime - -type Movie { - createdAt: DateTime - id: ID - imdbRating: Float - isbn: String! - screenTime: Duration - someBigInt: BigInt - someInt: Int - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someTime: Time - title: String -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - -""" -Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. -""" -input MovieSort { - createdAt: SortDirection - id: SortDirection - imdbRating: SortDirection - isbn: SortDirection - screenTime: SortDirection - someBigInt: SortDirection - someInt: SortDirection - someLocalDateTime: SortDirection - someLocalTime: SortDirection - someTime: SortDirection - title: SortDirection -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - createdAt: DateTime - createdAt_GT: DateTime - createdAt_GTE: DateTime - createdAt_IN: [DateTime] - createdAt_LT: DateTime - createdAt_LTE: DateTime - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_STARTS_WITH: ID - imdbRating: Float - imdbRating_GT: Float - imdbRating_GTE: Float - imdbRating_IN: [Float] - imdbRating_LT: Float - imdbRating_LTE: Float - isbn: String - isbn_CONTAINS: String - isbn_ENDS_WITH: String - isbn_IN: [String!] - isbn_STARTS_WITH: String - screenTime: Duration - screenTime_GT: Duration - screenTime_GTE: Duration - screenTime_IN: [Duration] - screenTime_LT: Duration - screenTime_LTE: Duration - someBigInt: BigInt - someBigInt_GT: BigInt - someBigInt_GTE: BigInt - someBigInt_IN: [BigInt] - someBigInt_LT: BigInt - someBigInt_LTE: BigInt - someInt: Int - someInt_GT: Int - someInt_GTE: Int - someInt_IN: [Int] - someInt_LT: Int - someInt_LTE: Int - someLocalDateTime: LocalDateTime - someLocalDateTime_GT: LocalDateTime - someLocalDateTime_GTE: LocalDateTime - someLocalDateTime_IN: [LocalDateTime] - someLocalDateTime_LT: LocalDateTime - someLocalDateTime_LTE: LocalDateTime - someLocalTime: LocalTime - someLocalTime_GT: LocalTime - someLocalTime_GTE: LocalTime - someLocalTime_IN: [LocalTime] - someLocalTime_LT: LocalTime - someLocalTime_LTE: LocalTime - someTime: Time - someTime_GT: Time - someTime_GTE: Time - someTime_IN: [Time] - someTime_LT: Time - someTime_LTE: Time - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} - -"""A time, represented as an RFC3339 time string""" -scalar Time ----- - -== Where Level Aggregations - -.Schema -[source,graphql,schema=true] ----- -type User { - someId: ID - someString: String - someFloat: Float - someInt: Int - someBigInt: BigInt - someDateTime: DateTime - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someTime: Time - someDuration: Duration -} - -type Post { - title: String - likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") -} - -type Likes @relationshipProperties { - someId: ID - someString: String - someFloat: Float - someInt: Int - someBigInt: BigInt - someDateTime: DateTime - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someTime: Time - someDuration: Duration -} ----- - -.Augmented Schema -[source,graphql,augmented=true] ----- -schema { - query: Query -} - -""" -A BigInt value up to 64 bits in size, which can be a number or a string if used inline, or a string only if used as a variable. Always returned as a string. -""" -scalar BigInt - -"""A date and time, represented as an ISO-8601 string""" -scalar DateTime - -"""A duration, represented as an ISO 8601 duration string""" -scalar Duration - -""" -The edge properties for the following fields: -* Post.likes -""" -type Likes { - someBigInt: BigInt - someDateTime: DateTime - someDuration: Duration - someFloat: Float - someId: ID - someInt: Int - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someString: String - someTime: Time -} - -input LikesSort { - someBigInt: SortDirection - someDateTime: SortDirection - someDuration: SortDirection - someFloat: SortDirection - someId: SortDirection - someInt: SortDirection - someLocalDateTime: SortDirection - someLocalTime: SortDirection - someString: SortDirection - someTime: SortDirection -} - -input LikesWhere { - AND: [LikesWhere!] - NOT: LikesWhere - OR: [LikesWhere!] - someBigInt: BigInt - someBigInt_GT: BigInt - someBigInt_GTE: BigInt - someBigInt_IN: [BigInt] - someBigInt_LT: BigInt - someBigInt_LTE: BigInt - someDateTime: DateTime - someDateTime_GT: DateTime - someDateTime_GTE: DateTime - someDateTime_IN: [DateTime] - someDateTime_LT: DateTime - someDateTime_LTE: DateTime - someDuration: Duration - someDuration_GT: Duration - someDuration_GTE: Duration - someDuration_IN: [Duration] - someDuration_LT: Duration - someDuration_LTE: Duration - someFloat: Float - someFloat_GT: Float - someFloat_GTE: Float - someFloat_IN: [Float] - someFloat_LT: Float - someFloat_LTE: Float - someId: ID - someId_CONTAINS: ID - someId_ENDS_WITH: ID - someId_IN: [ID] - someId_STARTS_WITH: ID - someInt: Int - someInt_GT: Int - someInt_GTE: Int - someInt_IN: [Int] - someInt_LT: Int - someInt_LTE: Int - someLocalDateTime: LocalDateTime - someLocalDateTime_GT: LocalDateTime - someLocalDateTime_GTE: LocalDateTime - someLocalDateTime_IN: [LocalDateTime] - someLocalDateTime_LT: LocalDateTime - someLocalDateTime_LTE: LocalDateTime - someLocalTime: LocalTime - someLocalTime_GT: LocalTime - someLocalTime_GTE: LocalTime - someLocalTime_IN: [LocalTime] - someLocalTime_LT: LocalTime - someLocalTime_LTE: LocalTime - someString: String - someString_CONTAINS: String - someString_ENDS_WITH: String - someString_IN: [String] - someString_STARTS_WITH: String - someTime: Time - someTime_GT: Time - someTime_GTE: Time - someTime_IN: [Time] - someTime_LT: Time - someTime_LTE: Time -} - -"""A local datetime, represented as 'YYYY-MM-DDTHH:MM:SS'""" -scalar LocalDateTime - -""" -A local time, represented as a time string without timezone information -""" -scalar LocalTime - -"""Pagination information (Relay)""" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Post { - likes(directed: Boolean = true, options: UserOptions, where: UserWhere): [User!]! - likesConnection(after: String, directed: Boolean = true, first: Int, sort: [PostLikesConnectionSort!], where: PostLikesConnectionWhere): PostLikesConnection! - title: String -} - -type PostEdge { - cursor: String! - node: Post! -} - -type PostLikesConnection { - edges: [PostLikesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PostLikesConnectionSort { - edge: LikesSort - node: UserSort -} - -input PostLikesConnectionWhere { - AND: [PostLikesConnectionWhere!] - NOT: PostLikesConnectionWhere - OR: [PostLikesConnectionWhere!] - edge: LikesWhere - node: UserWhere -} - -type PostLikesRelationship { - cursor: String! - node: User! - properties: Likes! -} - -input PostOptions { - limit: Int - offset: Int - """ - Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [PostSort!] -} - -""" -Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. -""" -input PostSort { - title: SortDirection -} - -input PostWhere { - AND: [PostWhere!] - NOT: PostWhere - OR: [PostWhere!] - """ - Return Posts where all of the related PostLikesConnections match this filter - """ - likesConnection_ALL: PostLikesConnectionWhere - """ - Return Posts where none of the related PostLikesConnections match this filter - """ - likesConnection_NONE: PostLikesConnectionWhere - """ - Return Posts where one of the related PostLikesConnections match this filter - """ - likesConnection_SINGLE: PostLikesConnectionWhere - """ - Return Posts where some of the related PostLikesConnections match this filter - """ - likesConnection_SOME: PostLikesConnectionWhere - """Return Posts where all of the related Users match this filter""" - likes_ALL: UserWhere - """Return Posts where none of the related Users match this filter""" - likes_NONE: UserWhere - """Return Posts where one of the related Users match this filter""" - likes_SINGLE: UserWhere - """Return Posts where some of the related Users match this filter""" - likes_SOME: UserWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_STARTS_WITH: String -} - -type PostsConnection { - edges: [PostEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - posts(options: PostOptions, where: PostWhere): [Post!]! - postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -"""An enum for sorting in either ascending or descending order.""" -enum SortDirection { - """Sort by field values in ascending order.""" - ASC - """Sort by field values in descending order.""" - DESC -} - -"""A time, represented as an RFC3339 time string""" -scalar Time - -type User { - someBigInt: BigInt - someDateTime: DateTime - someDuration: Duration - someFloat: Float - someId: ID - someInt: Int - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someString: String - someTime: Time -} - -type UserEdge { - cursor: String! - node: User! -} - -input UserOptions { - limit: Int - offset: Int - """ - Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [UserSort!] -} - -""" -Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. -""" -input UserSort { - someBigInt: SortDirection - someDateTime: SortDirection - someDuration: SortDirection - someFloat: SortDirection - someId: SortDirection - someInt: SortDirection - someLocalDateTime: SortDirection - someLocalTime: SortDirection - someString: SortDirection - someTime: SortDirection -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - someBigInt: BigInt - someBigInt_GT: BigInt - someBigInt_GTE: BigInt - someBigInt_IN: [BigInt] - someBigInt_LT: BigInt - someBigInt_LTE: BigInt - someDateTime: DateTime - someDateTime_GT: DateTime - someDateTime_GTE: DateTime - someDateTime_IN: [DateTime] - someDateTime_LT: DateTime - someDateTime_LTE: DateTime - someDuration: Duration - someDuration_GT: Duration - someDuration_GTE: Duration - someDuration_IN: [Duration] - someDuration_LT: Duration - someDuration_LTE: Duration - someFloat: Float - someFloat_GT: Float - someFloat_GTE: Float - someFloat_IN: [Float] - someFloat_LT: Float - someFloat_LTE: Float - someId: ID - someId_CONTAINS: ID - someId_ENDS_WITH: ID - someId_IN: [ID] - someId_STARTS_WITH: ID - someInt: Int - someInt_GT: Int - someInt_GTE: Int - someInt_IN: [Int] - someInt_LT: Int - someInt_LTE: Int - someLocalDateTime: LocalDateTime - someLocalDateTime_GT: LocalDateTime - someLocalDateTime_GTE: LocalDateTime - someLocalDateTime_IN: [LocalDateTime] - someLocalDateTime_LT: LocalDateTime - someLocalDateTime_LTE: LocalDateTime - someLocalTime: LocalTime - someLocalTime_GT: LocalTime - someLocalTime_GTE: LocalTime - someLocalTime_IN: [LocalTime] - someLocalTime_LT: LocalTime - someLocalTime_LTE: LocalTime - someString: String - someString_CONTAINS: String - someString_ENDS_WITH: String - someString_IN: [String] - someString_STARTS_WITH: String - someTime: Time - someTime_GT: Time - someTime_GTE: Time - someTime_IN: [Time] - someTime_LT: Time - someTime_LTE: Time -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} ----- diff --git a/core/src/test/resources/tck-test-files/schema/v2/remove-deprecated/array-methods.adoc b/core/src/test/resources/tck-test-files/schema/v2/remove-deprecated/array-methods.adoc index 7021e621..99f06b68 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/remove-deprecated/array-methods.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/remove-deprecated/array-methods.adoc @@ -8,12 +8,12 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String actedIn: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } -type Movie { +type Movie @node { id: ID! ratings: [Float!]! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) @@ -42,8 +42,8 @@ type ActedIn { } type Actor { - actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String } @@ -71,8 +71,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! averageRating: Float! id: ID! ratings: [Float!]! @@ -110,10 +110,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -132,7 +132,8 @@ input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - pay: [Float] + pay: [Float] @deprecated(reason : "Please use the explicit _EQ version") + pay_EQ: [Float] pay_INCLUDES: Float } @@ -149,13 +150,6 @@ input ActorActedInConnectionWhere { node: MovieWhere } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { name: SortDirection @@ -181,9 +175,10 @@ input ActorWhere { actedIn_SINGLE: MovieWhere "Return Actors where some of the related Movies match this filter" actedIn_SOME: MovieWhere - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -201,13 +196,6 @@ input MovieActorsConnectionWhere { node: ActorWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { averageRating: SortDirection @@ -234,18 +222,21 @@ input MovieWhere { actors_SINGLE: ActorWhere "Return Movies where some of the related Actors match this filter" actors_SOME: ActorWhere - averageRating: Float + averageRating: Float @deprecated(reason : "Please use the explicit _EQ version") + averageRating_EQ: Float averageRating_GT: Float averageRating_GTE: Float averageRating_IN: [Float!] averageRating_LT: Float averageRating_LTE: Float - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID!] id_STARTS_WITH: ID - ratings: [Float!] + ratings: [Float!] @deprecated(reason : "Please use the explicit _EQ version") + ratings_EQ: [Float!] ratings_INCLUDES: Float } diff --git a/core/src/test/resources/tck-test-files/schema/v2/remove-deprecated/array-methods.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/remove-deprecated/array-methods.js.adoc index 0073560d..30f1c164 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/remove-deprecated/array-methods.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/remove-deprecated/array-methods.js.adoc @@ -9,12 +9,12 @@ .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String actedIn: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } -type Movie { +type Movie @node { id: ID! ratings: [Float!]! actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) @@ -50,13 +50,14 @@ input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - pay: [Float] + pay: [Float] @deprecated(reason: "Please use the explicit _EQ version") + pay_EQ: [Float] pay_INCLUDES: Float } type Actor { - actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String } @@ -90,15 +91,6 @@ type ActorEdge { node: Actor! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -134,9 +126,10 @@ input ActorWhere { actedIn_SINGLE: MovieWhere """Return Actors where some of the related Movies match this filter""" actedIn_SOME: MovieWhere - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -148,8 +141,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! averageRating: Float! id: ID! ratings: [Float!]! @@ -185,15 +178,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -230,18 +214,21 @@ input MovieWhere { actors_SINGLE: ActorWhere """Return Movies where some of the related Actors match this filter""" actors_SOME: ActorWhere - averageRating: Float + averageRating: Float @deprecated(reason: "Please use the explicit _EQ version") + averageRating_EQ: Float averageRating_GT: Float averageRating_GTE: Float averageRating_IN: [Float!] averageRating_LT: Float averageRating_LTE: Float - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID!] id_STARTS_WITH: ID - ratings: [Float!] + ratings: [Float!] @deprecated(reason: "Please use the explicit _EQ version") + ratings_EQ: [Float!] ratings_INCLUDES: Float } @@ -260,10 +247,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/remove-deprecated/comments.adoc b/core/src/test/resources/tck-test-files/schema/v2/remove-deprecated/comments.adoc index bd8001ee..c0fb863c 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/remove-deprecated/comments.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/remove-deprecated/comments.adoc @@ -19,7 +19,7 @@ enum Genre { } """A type describing a movie.""" -type Movie { +type Movie @node { id: ID "The number of actors who acted in the movie." actorCount: Int @@ -27,7 +27,7 @@ type Movie { averageRating: Float """ Is the movie active? - + This is measured based on annual profit. """ isActive: Boolean @@ -80,8 +80,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enumeration of movie genres." @@ -102,13 +102,6 @@ enum SortDirection { "A custom scalar." scalar CustomScalar -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { actorCount: SortDirection @@ -123,28 +116,34 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - actorCount: Int + actorCount: Int @deprecated(reason : "Please use the explicit _EQ version") + actorCount_EQ: Int actorCount_GT: Int actorCount_GTE: Int actorCount_IN: [Int] actorCount_LT: Int actorCount_LTE: Int - averageRating: Float + averageRating: Float @deprecated(reason : "Please use the explicit _EQ version") + averageRating_EQ: Float averageRating_GT: Float averageRating_GTE: Float averageRating_IN: [Float] averageRating_LT: Float averageRating_LTE: Float - customScalar: CustomScalar + customScalar: CustomScalar @deprecated(reason : "Please use the explicit _EQ version") + customScalar_EQ: CustomScalar customScalar_IN: [CustomScalar] - genre: Genre + genre: Genre @deprecated(reason : "Please use the explicit _EQ version") + genre_EQ: Genre genre_IN: [Genre] - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - isActive: Boolean + isActive: Boolean @deprecated(reason : "Please use the explicit _EQ version") + isActive_EQ: Boolean } ---- @@ -156,11 +155,11 @@ input MovieWhere { .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String } -type Movie { +type Movie @node { id: ID "Actors in Movie" actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) @@ -191,8 +190,8 @@ type ActorsConnection { type Movie { "Actors in Movie" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -227,10 +226,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -241,13 +240,6 @@ enum SortDirection { DESC } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { name: SortDirection @@ -257,9 +249,10 @@ input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -275,13 +268,6 @@ input MovieActorsConnectionWhere { node: ActorWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -307,9 +293,10 @@ input MovieWhere { actors_SINGLE: ActorWhere "Return Movies where some of the related Actors match this filter" actors_SOME: ActorWhere - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -325,12 +312,12 @@ interface Production { title: String! } -type Movie implements Production { +type Movie implements Production @node { title: String! runtime: Int! } -type Series implements Production { +type Series implements Production @node { title: String! episodes: Int! } @@ -339,7 +326,7 @@ type ActedIn @relationshipProperties { screenTime: Int! } -type Actor { +type Actor @node { name: String! "Acted in Production" actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") @@ -367,8 +354,8 @@ type ActedIn { type Actor { "Acted in Production" - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -431,14 +418,14 @@ type ProductionsConnection { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! + productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! + series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! + seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } type Series implements Production { @@ -478,7 +465,8 @@ input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - screenTime: Int + screenTime: Int @deprecated(reason : "Please use the explicit _EQ version") + screenTime_EQ: Int screenTime_GT: Int screenTime_GTE: Int screenTime_IN: [Int!] @@ -499,13 +487,6 @@ input ActorActedInConnectionWhere { node: ProductionWhere } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { name: SortDirection @@ -531,20 +512,14 @@ input ActorWhere { actedIn_SINGLE: ProductionWhere "Return Actors where some of the related Productions match this filter" actedIn_SOME: ProductionWhere - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { runtime: SortDirection @@ -555,26 +530,21 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - runtime: Int + runtime: Int @deprecated(reason : "Please use the explicit _EQ version") + runtime_EQ: Int runtime_GT: Int runtime_GTE: Int runtime_IN: [Int!] runtime_LT: Int runtime_LTE: Int - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } -input ProductionOptions { - limit: Int - offset: Int - "Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ProductionSort] -} - "Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object." input ProductionSort { title: SortDirection @@ -584,19 +554,13 @@ input ProductionWhere { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] -} - -input SeriesOptions { - limit: Int - offset: Int - "Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array." - sort: [SeriesSort!] + typename: [ProductionImplementation!] } "Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object." @@ -609,15 +573,17 @@ input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] - episodes: Int + episodes: Int @deprecated(reason : "Please use the explicit _EQ version") + episodes_EQ: Int episodes_GT: Int episodes_GTE: Int episodes_IN: [Int!] episodes_LT: Int episodes_LTE: Int - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } @@ -631,11 +597,11 @@ input SeriesWhere { ---- union Search = Movie | Genre -type Genre { +type Genre @node { id: ID } -type Movie { +type Movie @node { id: ID search: [Search!]! @relationship(type: "SEARCH", direction: OUT) searchNoDirective: Search @@ -668,8 +634,8 @@ type GenresConnection { type Movie { id: ID - search(directed: Boolean = true, options: QueryOptions, where: SearchWhere): [Search!]! - searchConnection(after: String, directed: Boolean = true, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! + search(limit: Int, offset: Int, where: SearchWhere): [Search!]! + searchConnection(after: String, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! searchNoDirective: Search } @@ -704,11 +670,11 @@ type PageInfo { } type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - searches(options: QueryOptions, where: SearchWhere): [Search!]! + genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! + genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + searches(limit: Int, offset: Int, where: SearchWhere): [Search!]! } "An enum for sorting in either ascending or descending order." @@ -719,13 +685,6 @@ enum SortDirection { DESC } -input GenreOptions { - limit: Int - offset: Int - "Specify one or more GenreSort objects to sort Genres by. The sorts will be applied in the order in which they are arranged in the array." - sort: [GenreSort!] -} - "Fields to sort Genres by. The order in which sorts are applied is not guaranteed when specifying many fields in one GenreSort object." input GenreSort { id: SortDirection @@ -735,20 +694,14 @@ input GenreWhere { AND: [GenreWhere!] NOT: GenreWhere OR: [GenreWhere!] - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - input MovieSearchConnectionWhere { Genre: MovieSearchGenreConnectionWhere Movie: MovieSearchMovieConnectionWhere @@ -777,9 +730,10 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID "Return Movies where all of the related MovieSearchConnections match this filter" @@ -800,12 +754,6 @@ input MovieWhere { search_SOME: SearchWhere } -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - input SearchWhere { Genre: GenreWhere Movie: MovieWhere diff --git a/core/src/test/resources/tck-test-files/schema/v2/remove-deprecated/comments.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/remove-deprecated/comments.js.adoc index 7b088b12..1f970881 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/remove-deprecated/comments.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/remove-deprecated/comments.js.adoc @@ -20,7 +20,7 @@ enum Genre { } """A type describing a movie.""" -type Movie { +type Movie @node { id: ID "The number of actors who acted in the movie." actorCount: Int @@ -76,15 +76,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -101,28 +92,34 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - actorCount: Int + actorCount: Int @deprecated(reason: "Please use the explicit _EQ version") + actorCount_EQ: Int actorCount_GT: Int actorCount_GTE: Int actorCount_IN: [Int] actorCount_LT: Int actorCount_LTE: Int - averageRating: Float + averageRating: Float @deprecated(reason: "Please use the explicit _EQ version") + averageRating_EQ: Float averageRating_GT: Float averageRating_GTE: Float averageRating_IN: [Float] averageRating_LT: Float averageRating_LTE: Float - customScalar: CustomScalar + customScalar: CustomScalar @deprecated(reason: "Please use the explicit _EQ version") + customScalar_EQ: CustomScalar customScalar_IN: [CustomScalar] - genre: Genre + genre: Genre @deprecated(reason: "Please use the explicit _EQ version") + genre_EQ: Genre genre_IN: [Genre] - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - isActive: Boolean + isActive: Boolean @deprecated(reason: "Please use the explicit _EQ version") + isActive_EQ: Boolean } type MoviesConnection { @@ -140,8 +137,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" @@ -160,11 +157,11 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Actor { +type Actor @node { name: String } -type Movie { +type Movie @node { id: ID "Actors in Movie" actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) @@ -187,15 +184,6 @@ type ActorEdge { node: Actor! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -207,9 +195,10 @@ input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String] name_STARTS_WITH: String } @@ -222,8 +211,8 @@ type ActorsConnection { type Movie { """Actors in Movie""" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -254,15 +243,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -298,9 +278,10 @@ input MovieWhere { actors_SINGLE: ActorWhere """Return Movies where some of the related Actors match this filter""" actors_SOME: ActorWhere - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -320,10 +301,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" @@ -344,12 +325,12 @@ interface Production { title: String! } -type Movie implements Production { +type Movie implements Production @node { title: String! runtime: Int! } -type Series implements Production { +type Series implements Production @node { title: String! episodes: Int! } @@ -358,7 +339,7 @@ type ActedIn @relationshipProperties { screenTime: Int! } -type Actor { +type Actor @node { name: String! "Acted in Production" actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") @@ -388,7 +369,8 @@ input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - screenTime: Int + screenTime: Int @deprecated(reason: "Please use the explicit _EQ version") + screenTime_EQ: Int screenTime_GT: Int screenTime_GTE: Int screenTime_IN: [Int!] @@ -398,8 +380,8 @@ input ActedInWhere { type Actor { """Acted in Production""" - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -433,15 +415,6 @@ type ActorEdge { node: Actor! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -477,9 +450,10 @@ input ActorWhere { actedIn_SINGLE: ProductionWhere """Return Actors where some of the related Productions match this filter""" actedIn_SOME: ProductionWhere - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } @@ -500,15 +474,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -521,15 +486,17 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - runtime: Int + runtime: Int @deprecated(reason: "Please use the explicit _EQ version") + runtime_EQ: Int runtime_GT: Int runtime_GTE: Int runtime_IN: [Int!] runtime_LT: Int runtime_LTE: Int - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } @@ -562,15 +529,6 @@ enum ProductionImplementation { Series } -input ProductionOptions { - limit: Int - offset: Int - """ - Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ProductionSort] -} - """ Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. """ @@ -582,12 +540,13 @@ input ProductionWhere { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] } type ProductionsConnection { @@ -597,14 +556,14 @@ type ProductionsConnection { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - productions(options: ProductionOptions, where: ProductionWhere): [Production!]! - productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! + productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! + series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! + seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } type Series implements Production { @@ -623,15 +582,6 @@ type SeriesEdge { node: Series! } -input SeriesOptions { - limit: Int - offset: Int - """ - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [SeriesSort!] -} - """ Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. """ @@ -644,15 +594,17 @@ input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] - episodes: Int + episodes: Int @deprecated(reason: "Please use the explicit _EQ version") + episodes_EQ: Int episodes_GT: Int episodes_GTE: Int episodes_IN: [Int!] episodes_LT: Int episodes_LTE: Int - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String!] title_STARTS_WITH: String } @@ -673,11 +625,11 @@ enum SortDirection { ---- union Search = Movie | Genre -type Genre { +type Genre @node { id: ID } -type Movie { +type Movie @node { id: ID search: [Search!]! @relationship(type: "SEARCH", direction: OUT) searchNoDirective: Search @@ -700,15 +652,6 @@ type GenreEdge { node: Genre! } -input GenreOptions { - limit: Int - offset: Int - """ - Specify one or more GenreSort objects to sort Genres by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [GenreSort!] -} - """ Fields to sort Genres by. The order in which sorts are applied is not guaranteed when specifying many fields in one GenreSort object. """ @@ -720,9 +663,10 @@ input GenreWhere { AND: [GenreWhere!] NOT: GenreWhere OR: [GenreWhere!] - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -735,8 +679,8 @@ type GenresConnection { type Movie { id: ID - search(directed: Boolean = true, options: QueryOptions, where: SearchWhere): [Search!]! - searchConnection(after: String, directed: Boolean = true, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! + search(limit: Int, offset: Int, where: SearchWhere): [Search!]! + searchConnection(after: String, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! searchNoDirective: Search } @@ -745,15 +689,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - type MovieSearchConnection { edges: [MovieSearchRelationship!]! pageInfo: PageInfo! @@ -795,9 +730,10 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID """ @@ -841,17 +777,11 @@ type PageInfo { } type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - searches(options: QueryOptions, where: SearchWhere): [Search!]! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int + genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! + genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + searches(limit: Int, offset: Int, where: SearchWhere): [Search!]! } union Search = Genre | Movie diff --git a/core/src/test/resources/tck-test-files/schema/v2/scalar.adoc b/core/src/test/resources/tck-test-files/schema/v2/scalar.adoc index 2926100b..2d9d3868 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/scalar.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/scalar.adoc @@ -10,7 +10,7 @@ ---- scalar CustomScalar -type Movie { +type Movie @node { id: ID myCustomArrayScalar: [CustomScalar!] myCustomScalar: CustomScalar @@ -52,8 +52,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -66,13 +66,6 @@ enum SortDirection { scalar CustomScalar -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -83,16 +76,20 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - myCustomArrayScalar: [CustomScalar!] + myCustomArrayScalar: [CustomScalar!] @deprecated(reason : "Please use the explicit _EQ version") + myCustomArrayScalar_EQ: [CustomScalar!] myCustomArrayScalar_INCLUDES: CustomScalar - myCustomScalar: CustomScalar + myCustomScalar: CustomScalar @deprecated(reason : "Please use the explicit _EQ version") + myCustomScalar_EQ: CustomScalar myCustomScalar_IN: [CustomScalar] - myRequiredCustomArrayScalar: [CustomScalar!] + myRequiredCustomArrayScalar: [CustomScalar!] @deprecated(reason : "Please use the explicit _EQ version") + myRequiredCustomArrayScalar_EQ: [CustomScalar!] myRequiredCustomArrayScalar_INCLUDES: CustomScalar } diff --git a/core/src/test/resources/tck-test-files/schema/v2/scalar.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/scalar.js.adoc index 323a817b..42fc4f4f 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/scalar.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/scalar.js.adoc @@ -11,7 +11,7 @@ ---- scalar CustomScalar -type Movie { +type Movie @node { id: ID myCustomArrayScalar: [CustomScalar!] myCustomScalar: CustomScalar @@ -40,15 +40,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -61,16 +52,20 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - myCustomArrayScalar: [CustomScalar!] + myCustomArrayScalar: [CustomScalar!] @deprecated(reason: "Please use the explicit _EQ version") + myCustomArrayScalar_EQ: [CustomScalar!] myCustomArrayScalar_INCLUDES: CustomScalar - myCustomScalar: CustomScalar + myCustomScalar: CustomScalar @deprecated(reason: "Please use the explicit _EQ version") + myCustomScalar_EQ: CustomScalar myCustomScalar_IN: [CustomScalar] - myRequiredCustomArrayScalar: [CustomScalar!] + myRequiredCustomArrayScalar: [CustomScalar!] @deprecated(reason: "Please use the explicit _EQ version") + myRequiredCustomArrayScalar_EQ: [CustomScalar!] myRequiredCustomArrayScalar_INCLUDES: CustomScalar } @@ -89,8 +84,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/simple.adoc b/core/src/test/resources/tck-test-files/schema/v2/simple.adoc index 6875b8b7..27d9d96c 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/simple.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/simple.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID actorCount: Int averageRating: Float @@ -50,8 +50,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -62,13 +62,6 @@ enum SortDirection { DESC } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { actorCount: SortDirection @@ -81,24 +74,28 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - actorCount: Int + actorCount: Int @deprecated(reason : "Please use the explicit _EQ version") + actorCount_EQ: Int actorCount_GT: Int actorCount_GTE: Int actorCount_IN: [Int] actorCount_LT: Int actorCount_LTE: Int - averageRating: Float + averageRating: Float @deprecated(reason : "Please use the explicit _EQ version") + averageRating_EQ: Float averageRating_GT: Float averageRating_GTE: Float averageRating_IN: [Float] averageRating_LT: Float averageRating_LTE: Float - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - isActive: Boolean + isActive: Boolean @deprecated(reason : "Please use the explicit _EQ version") + isActive_EQ: Boolean } ---- diff --git a/core/src/test/resources/tck-test-files/schema/v2/simple.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/simple.js.adoc index f52ae13f..5784ecc3 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/simple.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/simple.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID actorCount: Int averageRating: Float @@ -36,15 +36,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -59,24 +50,28 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - actorCount: Int + actorCount: Int @deprecated(reason: "Please use the explicit _EQ version") + actorCount_EQ: Int actorCount_GT: Int actorCount_GTE: Int actorCount_IN: [Int] actorCount_LT: Int actorCount_LTE: Int - averageRating: Float + averageRating: Float @deprecated(reason: "Please use the explicit _EQ version") + averageRating_EQ: Float averageRating_GT: Float averageRating_GTE: Float averageRating_IN: [Float] averageRating_LT: Float averageRating_LTE: Float - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - isActive: Boolean + isActive: Boolean @deprecated(reason: "Please use the explicit _EQ version") + isActive_EQ: Boolean } type MoviesConnection { @@ -94,8 +89,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/string-comparators.adoc b/core/src/test/resources/tck-test-files/schema/v2/string-comparators.adoc index 11a77378..ed279760 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/string-comparators.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/string-comparators.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String } ---- @@ -61,8 +61,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -73,13 +73,6 @@ enum SortDirection { DESC } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { title: SortDirection @@ -89,9 +82,10 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_GT: String title_GTE: String title_IN: [String] @@ -107,7 +101,7 @@ input MovieWhere { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String } ---- @@ -143,8 +137,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -155,13 +149,6 @@ enum SortDirection { DESC } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { title: SortDirection @@ -171,9 +158,10 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } @@ -185,7 +173,7 @@ input MovieWhere { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String } ---- @@ -237,8 +225,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -249,13 +237,6 @@ enum SortDirection { DESC } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { title: SortDirection @@ -265,9 +246,10 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_GT: String title_IN: [String] title_LT: String @@ -281,7 +263,7 @@ input MovieWhere { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") } @@ -290,7 +272,7 @@ type ActedIn @relationshipProperties { screenTime: String } -type Actor { +type Actor @node { name: String actedIn: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } @@ -330,8 +312,8 @@ type ActedIn { } type Actor { - actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String } @@ -359,8 +341,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -396,10 +378,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -418,9 +400,10 @@ input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - screenTime: String + screenTime: String @deprecated(reason : "Please use the explicit _EQ version") screenTime_CONTAINS: String screenTime_ENDS_WITH: String + screenTime_EQ: String screenTime_GT: String screenTime_GTE: String screenTime_IN: [String] @@ -442,13 +425,6 @@ input ActorActedInConnectionWhere { node: MovieWhere } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { name: SortDirection @@ -474,9 +450,10 @@ input ActorWhere { actedIn_SINGLE: MovieWhere "Return Actors where some of the related Movies match this filter" actedIn_SOME: MovieWhere - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_GT: String name_GTE: String name_IN: [String] @@ -498,13 +475,6 @@ input MovieActorsConnectionWhere { node: ActorWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { title: SortDirection @@ -530,9 +500,10 @@ input MovieWhere { actors_SINGLE: ActorWhere "Return Movies where some of the related Actors match this filter" actors_SOME: ActorWhere - title: String + title: String @deprecated(reason : "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_GT: String title_GTE: String title_IN: [String] diff --git a/core/src/test/resources/tck-test-files/schema/v2/string-comparators.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/string-comparators.js.adoc index 5f2c2810..71f02f22 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/string-comparators.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/string-comparators.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String } ---- @@ -47,15 +47,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -67,9 +58,10 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_GT: String title_GTE: String title_IN: [String] @@ -93,8 +85,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" @@ -111,7 +103,7 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String } ---- @@ -132,15 +124,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -152,9 +135,10 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_IN: [String] title_STARTS_WITH: String } @@ -174,8 +158,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" @@ -192,7 +176,7 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String } ---- @@ -229,15 +213,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -249,9 +224,10 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_GT: String title_IN: [String] title_LT: String @@ -273,8 +249,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" @@ -291,7 +267,7 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { title: String actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") } @@ -300,7 +276,7 @@ type ActedIn @relationshipProperties { screenTime: String } -type Actor { +type Actor @node { name: String actedIn: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } @@ -347,9 +323,10 @@ input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - screenTime: String + screenTime: String @deprecated(reason: "Please use the explicit _EQ version") screenTime_CONTAINS: String screenTime_ENDS_WITH: String + screenTime_EQ: String screenTime_GT: String screenTime_GTE: String screenTime_IN: [String] @@ -359,8 +336,8 @@ input ActedInWhere { } type Actor { - actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String } @@ -394,15 +371,6 @@ type ActorEdge { node: Actor! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -438,9 +406,10 @@ input ActorWhere { actedIn_SINGLE: MovieWhere """Return Actors where some of the related Movies match this filter""" actedIn_SOME: MovieWhere - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_GT: String name_GTE: String name_IN: [String] @@ -456,8 +425,8 @@ type ActorsConnection { } type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -491,15 +460,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -535,9 +495,10 @@ input MovieWhere { actors_SINGLE: ActorWhere """Return Movies where some of the related Actors match this filter""" actors_SOME: ActorWhere - title: String + title: String @deprecated(reason: "Please use the explicit _EQ version") title_CONTAINS: String title_ENDS_WITH: String + title_EQ: String title_GT: String title_GTE: String title_IN: [String] @@ -561,10 +522,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/subscriptions.adoc b/core/src/test/resources/tck-test-files/schema/v2/subscriptions.adoc index cf05bdfe..b17147b8 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/subscriptions.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/subscriptions.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID actorCount: Int averageRating: Float @@ -16,7 +16,7 @@ type Movie { actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! } ---- @@ -45,8 +45,8 @@ type ActorsConnection { type Movie { actorCount: Int - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! averageRating: Float id: ID isActive: Boolean @@ -83,10 +83,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -97,13 +97,6 @@ enum SortDirection { DESC } -input ActorOptions { - limit: Int - offset: Int - "Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array." - sort: [ActorSort!] -} - "Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object." input ActorSort { name: SortDirection @@ -113,9 +106,10 @@ input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } @@ -131,13 +125,6 @@ input MovieActorsConnectionWhere { node: ActorWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { actorCount: SortDirection @@ -150,7 +137,8 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - actorCount: Int + actorCount: Int @deprecated(reason : "Please use the explicit _EQ version") + actorCount_EQ: Int actorCount_GT: Int actorCount_GTE: Int actorCount_IN: [Int] @@ -172,18 +160,21 @@ input MovieWhere { actors_SINGLE: ActorWhere "Return Movies where some of the related Actors match this filter" actors_SOME: ActorWhere - averageRating: Float + averageRating: Float @deprecated(reason : "Please use the explicit _EQ version") + averageRating_EQ: Float averageRating_GT: Float averageRating_GTE: Float averageRating_IN: [Float] averageRating_LT: Float averageRating_LTE: Float - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - isActive: Boolean + isActive: Boolean @deprecated(reason : "Please use the explicit _EQ version") + isActive_EQ: Boolean } ---- @@ -193,7 +184,7 @@ input MovieWhere { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID actorCount: Int averageRating: Float @@ -201,7 +192,7 @@ type Movie { actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } ---- @@ -214,8 +205,8 @@ schema { } type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! } type ActorEdge { @@ -242,8 +233,8 @@ type ActorsConnection { type Movie { actorCount: Int - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! averageRating: Float id: ID isActive: Boolean @@ -280,10 +271,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actors(limit: Int, offset: Int, where: ActorWhere): [Actor!]! actorsConnection(after: String, first: Int, where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -305,11 +296,6 @@ input ActorMoviesConnectionWhere { node: MovieWhere } -input ActorOptions { - limit: Int - offset: Int -} - input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere @@ -339,13 +325,6 @@ input MovieActorsConnectionWhere { node: ActorWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { actorCount: SortDirection @@ -358,7 +337,8 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - actorCount: Int + actorCount: Int @deprecated(reason : "Please use the explicit _EQ version") + actorCount_EQ: Int actorCount_GT: Int actorCount_GTE: Int actorCount_IN: [Int] @@ -380,18 +360,21 @@ input MovieWhere { actors_SINGLE: ActorWhere "Return Movies where some of the related Actors match this filter" actors_SOME: ActorWhere - averageRating: Float + averageRating: Float @deprecated(reason : "Please use the explicit _EQ version") + averageRating_EQ: Float averageRating_GT: Float averageRating_GTE: Float averageRating_IN: [Float] averageRating_LT: Float averageRating_LTE: Float - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - isActive: Boolean + isActive: Boolean @deprecated(reason : "Please use the explicit _EQ version") + isActive_EQ: Boolean } ---- @@ -401,7 +384,7 @@ input MovieWhere { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID actorCount: Int averageRating: Float @@ -411,11 +394,11 @@ type Movie { union Actor = Star | Person -type Star { +type Star @node { movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } -type Person { +type Person @node { movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } ---- @@ -431,8 +414,8 @@ union Actor = Person | Star type Movie { actorCount: Int - actors(directed: Boolean = true, options: QueryOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! averageRating: Float id: ID isActive: Boolean @@ -475,8 +458,8 @@ type PeopleConnection { } type Person { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! } type PersonEdge { @@ -496,18 +479,18 @@ type PersonMoviesRelationship { } type Query { - actors(options: QueryOptions, where: ActorWhere): [Actor!]! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! + actors(limit: Int, offset: Int, where: ActorWhere): [Actor!]! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, where: PersonWhere): [Person!]! peopleConnection(after: String, first: Int, where: PersonWhere): PeopleConnection! - stars(options: StarOptions, where: StarWhere): [Star!]! + stars(limit: Int, offset: Int, where: StarWhere): [Star!]! starsConnection(after: String, first: Int, where: StarWhere): StarsConnection! } type Star { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [StarMoviesConnectionSort!], where: StarMoviesConnectionWhere): StarMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [StarMoviesConnectionSort!], where: StarMoviesConnectionWhere): StarMoviesConnection! } type StarEdge { @@ -564,13 +547,6 @@ input MovieActorsStarConnectionWhere { node: StarWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { actorCount: SortDirection @@ -583,7 +559,8 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - actorCount: Int + actorCount: Int @deprecated(reason : "Please use the explicit _EQ version") + actorCount_EQ: Int actorCount_GT: Int actorCount_GTE: Int actorCount_IN: [Int] @@ -605,18 +582,21 @@ input MovieWhere { actors_SINGLE: ActorWhere "Return Movies where some of the related Actors match this filter" actors_SOME: ActorWhere - averageRating: Float + averageRating: Float @deprecated(reason : "Please use the explicit _EQ version") + averageRating_EQ: Float averageRating_GT: Float averageRating_GTE: Float averageRating_IN: [Float] averageRating_LT: Float averageRating_LTE: Float - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - isActive: Boolean + isActive: Boolean @deprecated(reason : "Please use the explicit _EQ version") + isActive_EQ: Boolean } input PersonMoviesConnectionSort { @@ -630,11 +610,6 @@ input PersonMoviesConnectionWhere { node: MovieWhere } -input PersonOptions { - limit: Int - offset: Int -} - input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere @@ -657,12 +632,6 @@ input PersonWhere { movies_SOME: MovieWhere } -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - input StarMoviesConnectionSort { node: MovieSort } @@ -674,11 +643,6 @@ input StarMoviesConnectionWhere { node: MovieWhere } -input StarOptions { - limit: Int - offset: Int -} - input StarWhere { AND: [StarWhere!] NOT: StarWhere @@ -708,7 +672,7 @@ input StarWhere { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID actorCount: Int averageRating: Float @@ -720,7 +684,7 @@ type ActedIn @relationshipProperties { screenTime: Int! } -type Actor { +type Actor @node { movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } ---- @@ -741,8 +705,8 @@ type ActedIn { } type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! } type ActorEdge { @@ -769,8 +733,8 @@ type ActorsConnection { type Movie { actorCount: Int - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! averageRating: Float id: ID isActive: Boolean @@ -808,10 +772,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actors(limit: Int, offset: Int, where: ActorWhere): [Actor!]! actorsConnection(after: String, first: Int, where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -830,7 +794,8 @@ input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - screenTime: Int + screenTime: Int @deprecated(reason : "Please use the explicit _EQ version") + screenTime_EQ: Int screenTime_GT: Int screenTime_GTE: Int screenTime_IN: [Int!] @@ -849,11 +814,6 @@ input ActorMoviesConnectionWhere { node: MovieWhere } -input ActorOptions { - limit: Int - offset: Int -} - input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere @@ -888,13 +848,6 @@ input MovieActorsConnectionWhere { node: ActorWhere } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { actorCount: SortDirection @@ -907,7 +860,8 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - actorCount: Int + actorCount: Int @deprecated(reason : "Please use the explicit _EQ version") + actorCount_EQ: Int actorCount_GT: Int actorCount_GTE: Int actorCount_IN: [Int] @@ -929,18 +883,21 @@ input MovieWhere { actors_SINGLE: ActorWhere "Return Movies where some of the related Actors match this filter" actors_SOME: ActorWhere - averageRating: Float + averageRating: Float @deprecated(reason : "Please use the explicit _EQ version") + averageRating_EQ: Float averageRating_GT: Float averageRating_GTE: Float averageRating_IN: [Float] averageRating_LT: Float averageRating_LTE: Float - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - isActive: Boolean + isActive: Boolean @deprecated(reason : "Please use the explicit _EQ version") + isActive_EQ: Boolean } ---- diff --git a/core/src/test/resources/tck-test-files/schema/v2/subscriptions.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/subscriptions.js.adoc index 67086a4d..e67e57e8 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/subscriptions.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/subscriptions.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID actorCount: Int averageRating: Float @@ -17,7 +17,7 @@ type Movie { actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { name: String! } ---- @@ -38,15 +38,6 @@ type ActorEdge { node: Actor! } -input ActorOptions { - limit: Int - offset: Int - """ - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [ActorSort!] -} - """ Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. """ @@ -58,9 +49,10 @@ input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String } @@ -73,8 +65,8 @@ type ActorsConnection { type Movie { actorCount: Int - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! averageRating: Float id: ID isActive: Boolean @@ -107,15 +99,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -130,7 +113,8 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - actorCount: Int + actorCount: Int @deprecated(reason: "Please use the explicit _EQ version") + actorCount_EQ: Int actorCount_GT: Int actorCount_GTE: Int actorCount_IN: [Int] @@ -160,18 +144,21 @@ input MovieWhere { actors_SINGLE: ActorWhere """Return Movies where some of the related Actors match this filter""" actors_SOME: ActorWhere - averageRating: Float + averageRating: Float @deprecated(reason: "Please use the explicit _EQ version") + averageRating_EQ: Float averageRating_GT: Float averageRating_GTE: Float averageRating_IN: [Float] averageRating_LT: Float averageRating_LTE: Float - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - isActive: Boolean + isActive: Boolean @deprecated(reason: "Please use the explicit _EQ version") + isActive_EQ: Boolean } type MoviesConnection { @@ -189,10 +176,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" @@ -209,7 +196,7 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID actorCount: Int averageRating: Float @@ -217,7 +204,7 @@ type Movie { actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } -type Actor { +type Actor @node { movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } ---- @@ -230,8 +217,8 @@ schema { } type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! } type ActorEdge { @@ -261,11 +248,6 @@ type ActorMoviesRelationship { node: Movie! } -input ActorOptions { - limit: Int - offset: Int -} - input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere @@ -304,8 +286,8 @@ type ActorsConnection { type Movie { actorCount: Int - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! averageRating: Float id: ID isActive: Boolean @@ -334,15 +316,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -357,7 +330,8 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - actorCount: Int + actorCount: Int @deprecated(reason: "Please use the explicit _EQ version") + actorCount_EQ: Int actorCount_GT: Int actorCount_GTE: Int actorCount_IN: [Int] @@ -387,18 +361,21 @@ input MovieWhere { actors_SINGLE: ActorWhere """Return Movies where some of the related Actors match this filter""" actors_SOME: ActorWhere - averageRating: Float + averageRating: Float @deprecated(reason: "Please use the explicit _EQ version") + averageRating_EQ: Float averageRating_GT: Float averageRating_GTE: Float averageRating_IN: [Float] averageRating_LT: Float averageRating_LTE: Float - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - isActive: Boolean + isActive: Boolean @deprecated(reason: "Please use the explicit _EQ version") + isActive_EQ: Boolean } type MoviesConnection { @@ -416,10 +393,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actors(limit: Int, offset: Int, where: ActorWhere): [Actor!]! actorsConnection(after: String, first: Int, where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" @@ -436,7 +413,7 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID actorCount: Int averageRating: Float @@ -446,11 +423,11 @@ type Movie { union Actor = Star | Person -type Star { +type Star @node { movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } -type Person { +type Person @node { movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } ---- @@ -471,8 +448,8 @@ input ActorWhere { type Movie { actorCount: Int - actors(directed: Boolean = true, options: QueryOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! averageRating: Float id: ID isActive: Boolean @@ -513,15 +490,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -536,7 +504,8 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - actorCount: Int + actorCount: Int @deprecated(reason: "Please use the explicit _EQ version") + actorCount_EQ: Int actorCount_GT: Int actorCount_GTE: Int actorCount_IN: [Int] @@ -566,18 +535,21 @@ input MovieWhere { actors_SINGLE: ActorWhere """Return Movies where some of the related Actors match this filter""" actors_SOME: ActorWhere - averageRating: Float + averageRating: Float @deprecated(reason: "Please use the explicit _EQ version") + averageRating_EQ: Float averageRating_GT: Float averageRating_GTE: Float averageRating_IN: [Float] averageRating_LT: Float averageRating_LTE: Float - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - isActive: Boolean + isActive: Boolean @deprecated(reason: "Please use the explicit _EQ version") + isActive_EQ: Boolean } type MoviesConnection { @@ -601,8 +573,8 @@ type PeopleConnection { } type Person { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! } type PersonEdge { @@ -632,11 +604,6 @@ type PersonMoviesRelationship { node: Movie! } -input PersonOptions { - limit: Int - offset: Int -} - input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere @@ -668,21 +635,15 @@ input PersonWhere { } type Query { - actors(options: QueryOptions, where: ActorWhere): [Actor!]! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! + actors(limit: Int, offset: Int, where: ActorWhere): [Actor!]! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + people(limit: Int, offset: Int, where: PersonWhere): [Person!]! peopleConnection(after: String, first: Int, where: PersonWhere): PeopleConnection! - stars(options: StarOptions, where: StarWhere): [Star!]! + stars(limit: Int, offset: Int, where: StarWhere): [Star!]! starsConnection(after: String, first: Int, where: StarWhere): StarsConnection! } -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int -} - """An enum for sorting in either ascending or descending order.""" enum SortDirection { """Sort by field values in ascending order.""" @@ -692,8 +653,8 @@ enum SortDirection { } type Star { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [StarMoviesConnectionSort!], where: StarMoviesConnectionWhere): StarMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [StarMoviesConnectionSort!], where: StarMoviesConnectionWhere): StarMoviesConnection! } type StarEdge { @@ -723,11 +684,6 @@ type StarMoviesRelationship { node: Movie! } -input StarOptions { - limit: Int - offset: Int -} - input StarWhere { AND: [StarWhere!] NOT: StarWhere @@ -770,7 +726,7 @@ type StarsConnection { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID actorCount: Int averageRating: Float @@ -782,7 +738,7 @@ type ActedIn @relationshipProperties { screenTime: Int! } -type Actor { +type Actor @node { movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } ---- @@ -810,7 +766,8 @@ input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - screenTime: Int + screenTime: Int @deprecated(reason: "Please use the explicit _EQ version") + screenTime_EQ: Int screenTime_GT: Int screenTime_GTE: Int screenTime_IN: [Int!] @@ -819,8 +776,8 @@ input ActedInWhere { } type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! } type ActorEdge { @@ -850,11 +807,6 @@ type ActorMoviesRelationship { node: Movie! } -input ActorOptions { - limit: Int - offset: Int -} - input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere @@ -893,8 +845,8 @@ type ActorsConnection { type Movie { actorCount: Int - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! averageRating: Float id: ID isActive: Boolean @@ -929,15 +881,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -952,7 +895,8 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - actorCount: Int + actorCount: Int @deprecated(reason: "Please use the explicit _EQ version") + actorCount_EQ: Int actorCount_GT: Int actorCount_GTE: Int actorCount_IN: [Int] @@ -982,18 +926,21 @@ input MovieWhere { actors_SINGLE: ActorWhere """Return Movies where some of the related Actors match this filter""" actors_SOME: ActorWhere - averageRating: Float + averageRating: Float @deprecated(reason: "Please use the explicit _EQ version") + averageRating_EQ: Float averageRating_GT: Float averageRating_GTE: Float averageRating_IN: [Float] averageRating_LT: Float averageRating_LTE: Float - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - isActive: Boolean + isActive: Boolean @deprecated(reason: "Please use the explicit _EQ version") + isActive_EQ: Boolean } type MoviesConnection { @@ -1011,10 +958,10 @@ type PageInfo { } type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actors(limit: Int, offset: Int, where: ActorWhere): [Actor!]! actorsConnection(after: String, first: Int, where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/types/bigint.adoc b/core/src/test/resources/tck-test-files/schema/v2/types/bigint.adoc index e4835054..39fb098b 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/types/bigint.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/types/bigint.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type File { +type File @node { name: String! size: BigInt! } @@ -46,8 +46,8 @@ type PageInfo { } type Query { - files(options: FileOptions, where: FileWhere): [File!]! - filesConnection(after: String, first: Int, sort: [FileSort], where: FileWhere): FilesConnection! + files(limit: Int, offset: Int, sort: [FileSort!], where: FileWhere): [File!]! + filesConnection(after: String, first: Int, sort: [FileSort!], where: FileWhere): FilesConnection! } "An enum for sorting in either ascending or descending order." @@ -61,13 +61,6 @@ enum SortDirection { "A BigInt value up to 64 bits in size, which can be a number or a string if used inline, or a string only if used as a variable. Always returned as a string." scalar BigInt -input FileOptions { - limit: Int - offset: Int - "Specify one or more FileSort objects to sort Files by. The sorts will be applied in the order in which they are arranged in the array." - sort: [FileSort!] -} - "Fields to sort Files by. The order in which sorts are applied is not guaranteed when specifying many fields in one FileSort object." input FileSort { name: SortDirection @@ -78,12 +71,14 @@ input FileWhere { AND: [FileWhere!] NOT: FileWhere OR: [FileWhere!] - name: String + name: String @deprecated(reason : "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String - size: BigInt + size: BigInt @deprecated(reason : "Please use the explicit _EQ version") + size_EQ: BigInt size_GT: BigInt size_GTE: BigInt size_IN: [BigInt!] diff --git a/core/src/test/resources/tck-test-files/schema/v2/types/bigint.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/types/bigint.js.adoc index d2cd891f..a625d257 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/types/bigint.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/types/bigint.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type File { +type File @node { name: String! size: BigInt! } @@ -37,15 +37,6 @@ type FileEdge { node: File! } -input FileOptions { - limit: Int - offset: Int - """ - Specify one or more FileSort objects to sort Files by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [FileSort!] -} - """ Fields to sort Files by. The order in which sorts are applied is not guaranteed when specifying many fields in one FileSort object. """ @@ -58,12 +49,14 @@ input FileWhere { AND: [FileWhere!] NOT: FileWhere OR: [FileWhere!] - name: String + name: String @deprecated(reason: "Please use the explicit _EQ version") name_CONTAINS: String name_ENDS_WITH: String + name_EQ: String name_IN: [String!] name_STARTS_WITH: String - size: BigInt + size: BigInt @deprecated(reason: "Please use the explicit _EQ version") + size_EQ: BigInt size_GT: BigInt size_GTE: BigInt size_IN: [BigInt!] @@ -86,8 +79,8 @@ type PageInfo { } type Query { - files(options: FileOptions, where: FileWhere): [File!]! - filesConnection(after: String, first: Int, sort: [FileSort], where: FileWhere): FilesConnection! + files(limit: Int, offset: Int, sort: [FileSort!], where: FileWhere): [File!]! + filesConnection(after: String, first: Int, sort: [FileSort!], where: FileWhere): FilesConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/types/date.adoc b/core/src/test/resources/tck-test-files/schema/v2/types/date.adoc index 2ecaaeba..80447b42 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/types/date.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/types/date.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID date: Date } @@ -46,8 +46,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -61,13 +61,6 @@ enum SortDirection { "A date, represented as a 'yyyy-mm-dd' string" scalar Date -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { date: SortDirection @@ -78,15 +71,17 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - date: Date + date: Date @deprecated(reason : "Please use the explicit _EQ version") + date_EQ: Date date_GT: Date date_GTE: Date date_IN: [Date] date_LT: Date date_LTE: Date - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } diff --git a/core/src/test/resources/tck-test-files/schema/v2/types/date.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/types/date.js.adoc index d0ab318b..933e3a34 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/types/date.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/types/date.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID date: Date } @@ -35,15 +35,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -56,15 +47,17 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - date: Date + date: Date @deprecated(reason: "Please use the explicit _EQ version") + date_EQ: Date date_GT: Date date_GTE: Date date_IN: [Date] date_LT: Date date_LTE: Date - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -84,8 +77,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/types/datetime.adoc b/core/src/test/resources/tck-test-files/schema/v2/types/datetime.adoc index 7d604216..7e5b1181 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/types/datetime.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/types/datetime.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID datetime: DateTime } @@ -46,8 +46,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -61,13 +61,6 @@ enum SortDirection { "A date and time, represented as an ISO-8601 string" scalar DateTime -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { datetime: SortDirection @@ -78,15 +71,17 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - datetime: DateTime + datetime: DateTime @deprecated(reason : "Please use the explicit _EQ version") + datetime_EQ: DateTime datetime_GT: DateTime datetime_GTE: DateTime datetime_IN: [DateTime] datetime_LT: DateTime datetime_LTE: DateTime - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } diff --git a/core/src/test/resources/tck-test-files/schema/v2/types/datetime.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/types/datetime.js.adoc index 7cad41d4..618e469a 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/types/datetime.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/types/datetime.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID datetime: DateTime } @@ -35,15 +35,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -56,15 +47,17 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - datetime: DateTime + datetime: DateTime @deprecated(reason: "Please use the explicit _EQ version") + datetime_EQ: DateTime datetime_GT: DateTime datetime_GTE: DateTime datetime_IN: [DateTime] datetime_LT: DateTime datetime_LTE: DateTime - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -84,8 +77,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/types/duration.adoc b/core/src/test/resources/tck-test-files/schema/v2/types/duration.adoc index 956a47cd..62736c20 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/types/duration.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/types/duration.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID duration: Duration } @@ -46,8 +46,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -61,13 +61,6 @@ enum SortDirection { "A duration, represented as an ISO 8601 duration string" scalar Duration -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { duration: SortDirection @@ -78,15 +71,17 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - duration: Duration + duration: Duration @deprecated(reason : "Please use the explicit _EQ version") + duration_EQ: Duration duration_GT: Duration duration_GTE: Duration duration_IN: [Duration] duration_LT: Duration duration_LTE: Duration - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } diff --git a/core/src/test/resources/tck-test-files/schema/v2/types/duration.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/types/duration.js.adoc index acd39a06..c8db381e 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/types/duration.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/types/duration.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID duration: Duration } @@ -35,15 +35,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -56,15 +47,17 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - duration: Duration + duration: Duration @deprecated(reason: "Please use the explicit _EQ version") + duration_EQ: Duration duration_GT: Duration duration_GTE: Duration duration_IN: [Duration] duration_LT: Duration duration_LTE: Duration - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -84,8 +77,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/types/localdatetime.adoc b/core/src/test/resources/tck-test-files/schema/v2/types/localdatetime.adoc index 75e66c9b..03e00dd8 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/types/localdatetime.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/types/localdatetime.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID localDT: LocalDateTime } @@ -46,8 +46,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -61,13 +61,6 @@ enum SortDirection { "A local datetime, represented as 'YYYY-MM-DDTHH:MM:SS'" scalar LocalDateTime -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -78,12 +71,14 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - localDT: LocalDateTime + localDT: LocalDateTime @deprecated(reason : "Please use the explicit _EQ version") + localDT_EQ: LocalDateTime localDT_GT: LocalDateTime localDT_GTE: LocalDateTime localDT_IN: [LocalDateTime] diff --git a/core/src/test/resources/tck-test-files/schema/v2/types/localdatetime.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/types/localdatetime.js.adoc index 3168c941..6fd9da7b 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/types/localdatetime.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/types/localdatetime.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID localDT: LocalDateTime } @@ -35,15 +35,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -56,12 +47,14 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - localDT: LocalDateTime + localDT: LocalDateTime @deprecated(reason: "Please use the explicit _EQ version") + localDT_EQ: LocalDateTime localDT_GT: LocalDateTime localDT_GTE: LocalDateTime localDT_IN: [LocalDateTime] @@ -84,8 +77,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/types/localtime.adoc b/core/src/test/resources/tck-test-files/schema/v2/types/localtime.adoc index a69c7514..95782507 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/types/localtime.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/types/localtime.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID time: LocalTime } @@ -46,8 +46,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -61,13 +61,6 @@ enum SortDirection { "A local time, represented as a time string without timezone information" scalar LocalTime -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -78,12 +71,14 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - time: LocalTime + time: LocalTime @deprecated(reason : "Please use the explicit _EQ version") + time_EQ: LocalTime time_GT: LocalTime time_GTE: LocalTime time_IN: [LocalTime] diff --git a/core/src/test/resources/tck-test-files/schema/v2/types/localtime.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/types/localtime.js.adoc index eb1a0e76..16ad2e12 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/types/localtime.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/types/localtime.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID time: LocalTime } @@ -37,15 +37,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -58,12 +49,14 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - time: LocalTime + time: LocalTime @deprecated(reason: "Please use the explicit _EQ version") + time_EQ: LocalTime time_GT: LocalTime time_GTE: LocalTime time_IN: [LocalTime] @@ -86,8 +79,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/types/point.adoc b/core/src/test/resources/tck-test-files/schema/v2/types/point.adoc index 02c5a247..11675a7f 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/types/point.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/types/point.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { filmedAt: Point! } ---- @@ -75,8 +75,8 @@ type Point { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -87,13 +87,6 @@ enum SortDirection { DESC } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { filmedAt: SortDirection @@ -103,8 +96,9 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - filmedAt: PointInput + filmedAt: PointInput @deprecated(reason : "Please use the explicit _EQ version") filmedAt_DISTANCE: PointDistance + filmedAt_EQ: PointInput filmedAt_GT: PointDistance filmedAt_GTE: PointDistance filmedAt_IN: [PointInput!] @@ -142,7 +136,7 @@ input PointInput { .Schema [source,graphql,schema=true] ---- -type Machine { +type Machine @node { partLocation: CartesianPoint! } ---- @@ -200,8 +194,8 @@ type PageInfo { } type Query { - machines(options: MachineOptions, where: MachineWhere): [Machine!]! - machinesConnection(after: String, first: Int, sort: [MachineSort], where: MachineWhere): MachinesConnection! + machines(limit: Int, offset: Int, sort: [MachineSort!], where: MachineWhere): [Machine!]! + machinesConnection(after: String, first: Int, sort: [MachineSort!], where: MachineWhere): MachinesConnection! } "An enum for sorting in either ascending or descending order." @@ -225,13 +219,6 @@ input CartesianPointInput { z: Float } -input MachineOptions { - limit: Int - offset: Int - "Specify one or more MachineSort objects to sort Machines by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MachineSort!] -} - "Fields to sort Machines by. The order in which sorts are applied is not guaranteed when specifying many fields in one MachineSort object." input MachineSort { partLocation: SortDirection @@ -241,8 +228,9 @@ input MachineWhere { AND: [MachineWhere!] NOT: MachineWhere OR: [MachineWhere!] - partLocation: CartesianPointInput + partLocation: CartesianPointInput @deprecated(reason : "Please use the explicit _EQ version") partLocation_DISTANCE: CartesianPointDistance + partLocation_EQ: CartesianPointInput partLocation_GT: CartesianPointDistance partLocation_GTE: CartesianPointDistance partLocation_IN: [CartesianPointInput!] @@ -257,7 +245,7 @@ input MachineWhere { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { filmedAt: [Point!]! } ---- @@ -324,20 +312,16 @@ type Point { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! + movies(limit: Int, offset: Int, where: MovieWhere): [Movie!]! moviesConnection(after: String, first: Int, where: MovieWhere): MoviesConnection! } -input MovieOptions { - limit: Int - offset: Int -} - input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - filmedAt: [PointInput!] + filmedAt: [PointInput!] @deprecated(reason : "Please use the explicit _EQ version") + filmedAt_EQ: [PointInput!] filmedAt_INCLUDES: PointInput } @@ -364,7 +348,7 @@ input PointInput { .Schema [source,graphql,schema=true] ---- -type Machine { +type Machine @node { partLocations: [CartesianPoint!]! } ---- @@ -422,7 +406,7 @@ type PageInfo { } type Query { - machines(options: MachineOptions, where: MachineWhere): [Machine!]! + machines(limit: Int, offset: Int, where: MachineWhere): [Machine!]! machinesConnection(after: String, first: Int, where: MachineWhere): MachinesConnection! } @@ -433,16 +417,12 @@ input CartesianPointInput { z: Float } -input MachineOptions { - limit: Int - offset: Int -} - input MachineWhere { AND: [MachineWhere!] NOT: MachineWhere OR: [MachineWhere!] - partLocations: [CartesianPointInput!] + partLocations: [CartesianPointInput!] @deprecated(reason : "Please use the explicit _EQ version") + partLocations_EQ: [CartesianPointInput!] partLocations_INCLUDES: CartesianPointInput } diff --git a/core/src/test/resources/tck-test-files/schema/v2/types/point.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/types/point.js.adoc index b9f67690..b6630bcc 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/types/point.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/types/point.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { filmedAt: Point! } ---- @@ -30,15 +30,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -50,8 +41,9 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - filmedAt: PointInput + filmedAt: PointInput @deprecated(reason: "Please use the explicit _EQ version") filmedAt_DISTANCE: PointDistance + filmedAt_EQ: PointInput filmedAt_GT: PointDistance filmedAt_GTE: PointDistance filmedAt_IN: [PointInput!] @@ -132,8 +124,8 @@ input PointInput { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" @@ -150,7 +142,7 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Machine { +type Machine @node { partLocation: CartesianPoint! } ---- @@ -208,15 +200,6 @@ type MachineEdge { node: Machine! } -input MachineOptions { - limit: Int - offset: Int - """ - Specify one or more MachineSort objects to sort Machines by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MachineSort!] -} - """ Fields to sort Machines by. The order in which sorts are applied is not guaranteed when specifying many fields in one MachineSort object. """ @@ -228,8 +211,9 @@ input MachineWhere { AND: [MachineWhere!] NOT: MachineWhere OR: [MachineWhere!] - partLocation: CartesianPointInput + partLocation: CartesianPointInput @deprecated(reason: "Please use the explicit _EQ version") partLocation_DISTANCE: CartesianPointDistance + partLocation_EQ: CartesianPointInput partLocation_GT: CartesianPointDistance partLocation_GTE: CartesianPointDistance partLocation_IN: [CartesianPointInput!] @@ -252,8 +236,8 @@ type PageInfo { } type Query { - machines(options: MachineOptions, where: MachineWhere): [Machine!]! - machinesConnection(after: String, first: Int, sort: [MachineSort], where: MachineWhere): MachinesConnection! + machines(limit: Int, offset: Int, sort: [MachineSort!], where: MachineWhere): [Machine!]! + machinesConnection(after: String, first: Int, sort: [MachineSort!], where: MachineWhere): MachinesConnection! } """An enum for sorting in either ascending or descending order.""" @@ -270,7 +254,7 @@ enum SortDirection { .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { filmedAt: [Point!]! } ---- @@ -291,16 +275,12 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int -} - input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - filmedAt: [PointInput!] + filmedAt: [PointInput!] @deprecated(reason: "Please use the explicit _EQ version") + filmedAt_EQ: [PointInput!] filmedAt_INCLUDES: PointInput } @@ -370,7 +350,7 @@ input PointInput { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! + movies(limit: Int, offset: Int, where: MovieWhere): [Movie!]! moviesConnection(after: String, first: Int, where: MovieWhere): MoviesConnection! } ---- @@ -380,7 +360,7 @@ type Query { .Schema [source,graphql,schema=true] ---- -type Machine { +type Machine @node { partLocations: [CartesianPoint!]! } ---- @@ -432,16 +412,12 @@ type MachineEdge { node: Machine! } -input MachineOptions { - limit: Int - offset: Int -} - input MachineWhere { AND: [MachineWhere!] NOT: MachineWhere OR: [MachineWhere!] - partLocations: [CartesianPointInput!] + partLocations: [CartesianPointInput!] @deprecated(reason: "Please use the explicit _EQ version") + partLocations_EQ: [CartesianPointInput!] partLocations_INCLUDES: CartesianPointInput } @@ -460,7 +436,7 @@ type PageInfo { } type Query { - machines(options: MachineOptions, where: MachineWhere): [Machine!]! + machines(limit: Int, offset: Int, where: MachineWhere): [Machine!]! machinesConnection(after: String, first: Int, where: MachineWhere): MachinesConnection! } ---- diff --git a/core/src/test/resources/tck-test-files/schema/v2/types/time.adoc b/core/src/test/resources/tck-test-files/schema/v2/types/time.adoc index 55b1c926..150f3ea8 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/types/time.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/types/time.adoc @@ -8,7 +8,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID time: Time } @@ -46,8 +46,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } "An enum for sorting in either ascending or descending order." @@ -61,13 +61,6 @@ enum SortDirection { "A time, represented as an RFC3339 time string" scalar Time -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - "Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object." input MovieSort { id: SortDirection @@ -78,12 +71,14 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - time: Time + time: Time @deprecated(reason : "Please use the explicit _EQ version") + time_EQ: Time time_GT: Time time_GTE: Time time_IN: [Time] diff --git a/core/src/test/resources/tck-test-files/schema/v2/types/time.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/types/time.js.adoc index a55a0740..de5ec127 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/types/time.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/types/time.js.adoc @@ -9,7 +9,7 @@ .Schema [source,graphql,schema=true] ---- -type Movie { +type Movie @node { id: ID time: Time } @@ -32,15 +32,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - """ Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. """ @@ -53,12 +44,14 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - time: Time + time: Time @deprecated(reason: "Please use the explicit _EQ version") + time_EQ: Time time_GT: Time time_GTE: Time time_IN: [Time] @@ -81,8 +74,8 @@ type PageInfo { } type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } """An enum for sorting in either ascending or descending order.""" diff --git a/core/src/test/resources/tck-test-files/schema/v2/unions.adoc b/core/src/test/resources/tck-test-files/schema/v2/unions.adoc index 8f5149b6..12cba549 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/unions.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/unions.adoc @@ -10,11 +10,11 @@ ---- union Search = Movie | Genre -type Genre { +type Genre @node { id: ID } -type Movie { +type Movie @node { id: ID search: [Search!]! @relationship(type: "SEARCH", direction: OUT) searchNoDirective: Search @@ -47,8 +47,8 @@ type GenresConnection { type Movie { id: ID - search(directed: Boolean = true, options: QueryOptions, where: SearchWhere): [Search!]! - searchConnection(after: String, directed: Boolean = true, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! + search(limit: Int, offset: Int, where: SearchWhere): [Search!]! + searchConnection(after: String, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! searchNoDirective: Search } @@ -83,11 +83,11 @@ type PageInfo { } type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - searches(options: QueryOptions, where: SearchWhere): [Search!]! + genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! + genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + searches(limit: Int, offset: Int, where: SearchWhere): [Search!]! } "An enum for sorting in either ascending or descending order." @@ -98,13 +98,6 @@ enum SortDirection { DESC } -input GenreOptions { - limit: Int - offset: Int - "Specify one or more GenreSort objects to sort Genres by. The sorts will be applied in the order in which they are arranged in the array." - sort: [GenreSort!] -} - "Fields to sort Genres by. The order in which sorts are applied is not guaranteed when specifying many fields in one GenreSort object." input GenreSort { id: SortDirection @@ -114,20 +107,14 @@ input GenreWhere { AND: [GenreWhere!] NOT: GenreWhere OR: [GenreWhere!] - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } -input MovieOptions { - limit: Int - offset: Int - "Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array." - sort: [MovieSort!] -} - input MovieSearchConnectionWhere { Genre: MovieSearchGenreConnectionWhere Movie: MovieSearchMovieConnectionWhere @@ -156,9 +143,10 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id: ID + id: ID @deprecated(reason : "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID "Return Movies where all of the related MovieSearchConnections match this filter" @@ -179,12 +167,6 @@ input MovieWhere { search_SOME: SearchWhere } -"Input type for options that can be specified on a query operation." -input QueryOptions { - limit: Int - offset: Int -} - input SearchWhere { Genre: GenreWhere Movie: MovieWhere diff --git a/core/src/test/resources/tck-test-files/schema/v2/unions.js.adoc b/core/src/test/resources/tck-test-files/schema/v2/unions.js.adoc index c9ea5ce4..5df8aa70 100644 --- a/core/src/test/resources/tck-test-files/schema/v2/unions.js.adoc +++ b/core/src/test/resources/tck-test-files/schema/v2/unions.js.adoc @@ -11,11 +11,11 @@ ---- union Search = Movie | Genre -type Genre { +type Genre @node { id: ID } -type Movie { +type Movie @node { id: ID search: [Search!]! @relationship(type: "SEARCH", direction: OUT) searchNoDirective: Search @@ -38,15 +38,6 @@ type GenreEdge { node: Genre! } -input GenreOptions { - limit: Int - offset: Int - """ - Specify one or more GenreSort objects to sort Genres by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [GenreSort!] -} - """ Fields to sort Genres by. The order in which sorts are applied is not guaranteed when specifying many fields in one GenreSort object. """ @@ -58,9 +49,10 @@ input GenreWhere { AND: [GenreWhere!] NOT: GenreWhere OR: [GenreWhere!] - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID } @@ -73,8 +65,8 @@ type GenresConnection { type Movie { id: ID - search(directed: Boolean = true, options: QueryOptions, where: SearchWhere): [Search!]! - searchConnection(after: String, directed: Boolean = true, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! + search(limit: Int, offset: Int, where: SearchWhere): [Search!]! + searchConnection(after: String, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! searchNoDirective: Search } @@ -83,15 +75,6 @@ type MovieEdge { node: Movie! } -input MovieOptions { - limit: Int - offset: Int - """ - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - """ - sort: [MovieSort!] -} - type MovieSearchConnection { edges: [MovieSearchRelationship!]! pageInfo: PageInfo! @@ -133,9 +116,10 @@ input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id: ID + id: ID @deprecated(reason: "Please use the explicit _EQ version") id_CONTAINS: ID id_ENDS_WITH: ID + id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID """ @@ -179,17 +163,11 @@ type PageInfo { } type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - searches(options: QueryOptions, where: SearchWhere): [Search!]! -} - -"""Input type for options that can be specified on a query operation.""" -input QueryOptions { - limit: Int - offset: Int + genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! + genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + searches(limit: Int, offset: Int, where: SearchWhere): [Search!]! } union Search = Genre | Movie diff --git a/examples/dgs-spring-boot/src/main/resources/neo4j.graphql b/examples/dgs-spring-boot/src/main/resources/neo4j.graphql index 5905d0d2..3b81d927 100644 --- a/examples/dgs-spring-boot/src/main/resources/neo4j.graphql +++ b/examples/dgs-spring-boot/src/main/resources/neo4j.graphql @@ -1,4 +1,4 @@ -type Movie { +type Movie @node { title: String bar: String @customResolver javaData: [JavaData!] @customResolver(requires: "title") diff --git a/examples/graphql-kotlin-spring-boot/src/main/resources/schema.graphql b/examples/graphql-kotlin-spring-boot/src/main/resources/schema.graphql index 5e494a1c..1799e88a 100644 --- a/examples/graphql-kotlin-spring-boot/src/main/resources/schema.graphql +++ b/examples/graphql-kotlin-spring-boot/src/main/resources/schema.graphql @@ -1,10 +1,10 @@ -type Team { +type Team @node { id: ID! name: String! players: [Player!]! @relationship(type: "MEMBER_OF", direction: IN, properties: "Membership") } -type Player { +type Player @node { id: ID! name: String! teams: [Team!] @relationship(type: "MEMBER_OF", direction: OUT, properties: "Membership") diff --git a/examples/graphql-spring-boot/src/main/resources/neo4j.graphql b/examples/graphql-spring-boot/src/main/resources/neo4j.graphql index f051dad7..eec4db58 100644 --- a/examples/graphql-spring-boot/src/main/resources/neo4j.graphql +++ b/examples/graphql-spring-boot/src/main/resources/neo4j.graphql @@ -1,3 +1,3 @@ -type Movie { +type Movie @node { title: String } diff --git a/examples/graphql-spring-boot/src/test/java/org/neo4j/graphql/examples/graphqlspringboot/datafetcher/AdditionalDataFetcherTest.java b/examples/graphql-spring-boot/src/test/java/org/neo4j/graphql/examples/graphqlspringboot/datafetcher/AdditionalDataFetcherTest.java index 692418b6..163ae758 100644 --- a/examples/graphql-spring-boot/src/test/java/org/neo4j/graphql/examples/graphqlspringboot/datafetcher/AdditionalDataFetcherTest.java +++ b/examples/graphql-spring-boot/src/test/java/org/neo4j/graphql/examples/graphqlspringboot/datafetcher/AdditionalDataFetcherTest.java @@ -55,7 +55,7 @@ void testHybridDataFetcher() { this.graphQlTester.document(""" query { other - movies(options: { limit: 3, offset: null }) { + movies(limit: 3) { title bar javaData { diff --git a/pom.xml b/pom.xml index 183e8be8..937b3774 100755 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ 5.24.0 5.24.0 5.11.0 - 2024.2.0 + 2024.4.0