blob: dc70c474605a096921448b1dc94a2ff2b0dfaeeb [file] [log] [blame]
# ====================================================================
# Copyright (c) 2018, 2019 Obeo
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
# which accompanies this distribution, and is available at
# https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Obeo - initial API and implementation
# ====================================================================
pluginName = Sirius Services - GraphQL API Tests
providerName = Eclipse Modeling Project
introspectionQuery=query {\n\
__schema {\n\
queryType { name }\n\
mutationType { name } \n\
subscriptionType { name } \n\
types {\n\
...typeDetails\n\
}\n\
}\n\
}\n\
\n\
fragment typeDetails on __Type {\n\
kind\n\
name\n\
description\n\
fields(includeDeprecated: true) {\n\
name\n\
description\n\
args {\n\
...inputValueDetails\n\
}\n\
type {\n\
...typeReferenceDetails\n\
}\n\
isDeprecated\n\
deprecationReason\n\
}\n\
inputFields {\n\
...inputValueDetails\n\
}\n\
interfaces {\n\
...typeReferenceDetails\n\
}\n\
enumValues(includeDeprecated: true) {\n\
name\n\
description\n\
isDeprecated\n\
deprecationReason\n\
}\n\
possibleTypes {\n\
...typeReferenceDetails\n\
}\n\
}\n\
\n\
fragment inputValueDetails on __InputValue {\n\
name\n\
description\n\
defaultValue\n\
type {\n\
...typeReferenceDetails\n\
}\n\
}\n\
\n\
fragment typeReferenceDetails on __Type {\n\
kind\n\
name\n\
ofType {\n\
kind\n\
name\n\
ofType {\n\
kind\n\
name\n\
ofType {\n\
kind\n\
name\n\
}\n\
}\n\
}\n\
}
# ====================================================================
#
# Project test queries and results
#
# ====================================================================
findProjectNameByName=query findProject($projectName: String!) {\n\
viewer {\n\
project(name: $projectName) {\n\
name\n\
}\n\
}\n\
}
findProjectNameByName_resultSample = {\n\
"data": {\n\
"viewer": {\n\
"project": {\n\
"name": "org.eclipse.sirius.sample"\n\
}\n\
}\n\
}\n\
}
findProjectPathByName=query findProject($projectName: String!) {\n\
viewer {\n\
project(name: $projectName) {\n\
name\n\
path\n\
}\n\
}\n\
}
findProjectPathByName_resultSample = {\n\
"data": {\n\
"viewer": {\n\
"project": {\n\
"name": "org.eclipse.sirius.sample",\n\
"path": ""\n\
}\n\
}\n\
}\n\
}
findProjectContainerByName=query findProject($projectName: String!) {\n\
viewer {\n\
project(name: $projectName) {\n\
name\n\
container {\n\
... on Project {\n\
name\n\
}\n\
... on Folder {\n\
name\n\
}\n\
}\n\
}\n\
}\n\
}
findProjectContainerByName_resultSample = {\n\
"data": {\n\
"viewer": {\n\
"project": {\n\
"name": "org.eclipse.sirius.sample"\n\
}\n\
}\n\
}\n\
}
findProjectProjectByName=query findProject($projectName: String!) {\n\
viewer {\n\
project(name: $projectName) {\n\
name\n\
project {\n\
name\n\
}\n\
}\n\
}\n\
}
findProjectProjectByName_resultSample = {\n\
"data": {\n\
"viewer": {\n\
"project": {\n\
"name": "org.eclipse.sirius.sample",\n\
"project": {\n\
"name": "org.eclipse.sirius.sample"\n\
}\n\
}\n\
}\n\
}\n\
}
findProjectResourcesByName=query findProject($projectName: String!) {\n\
viewer {\n\
project(name: $projectName) {\n\
name\n\
resources(first: 10, after: null) {\n\
totalCount\n\
pageInfo {\n\
hasNextPage\n\
hasPreviousPage\n\
}\n\
edges {\n\
node {\n\
name\n\
}\n\
}\n\
}\n\
}\n\
}\n\
}
findProjectResourcesByName_resultSample = {\n\
"data": {\n\
"viewer": {\n\
"project": {\n\
"name": "org.eclipse.sirius.sample",\n\
"resources": {\n\
"totalCount": 1,\n\
"pageInfo": {\n\
"hasNextPage": false,\n\
"hasPreviousPage": false\n\
},\n\
"edges": [\n\
{\n\
"node": {\n\
"name": ".project"\n\
}\n\
}\n\
]\n\
}\n\
}\n\
}\n\
}\n\
}
findProjectDescriptionByName=query findProject($projectName: String!) {\n\
viewer {\n\
project(name: $projectName) {\n\
name\n\
description\n\
}\n\
}\n\
}
findProjectDescriptionByName_resultSample = {\n\
"data": {\n\
"viewer": {\n\
"project": {\n\
"name": "org.eclipse.sirius.sample",\n\
"description": "SampleDescription"\n\
}\n\
}\n\
}\n\
}
findProjectResourceByPathByName=query findProject($projectName: String!) {\n\
viewer {\n\
project(name: $projectName) {\n\
name\n\
resourceByPath(path: ".project") {\n\
name\n\
}\n\
}\n\
}\n\
}
findProjectResourceByPathByName_resultSample = {\n\
"data": {\n\
"viewer": {\n\
"project": {\n\
"name": "org.eclipse.sirius.sample",\n\
"resourceByPath": {\n\
"name": ".project"\n\
}\n\
}\n\
}\n\
}\n\
}
findProjectActivatedViewpointsByName=query findProject($projectName: String!) {\n\
viewer {\n\
project(name: $projectName) {\n\
name\n\
activatedViewpoints(first: 10, after: null) {\n\
totalCount\n\
pageInfo {\n\
hasNextPage\n\
hasPreviousPage\n\
}\n\
edges {\n\
node {\n\
identifier\n\
name\n\
}\n\
}\n\
}\n\
}\n\
}\n\
}
findProjectActivatedViewpointsByName_resultSample = {\n\
"data": {\n\
"viewer": {\n\
"project": {\n\
"name": "org.eclipse.sirius.sample",\n\
"activatedViewpoints": {\n\
"totalCount": 0,\n\
"pageInfo": {\n\
"hasNextPage": false,\n\
"hasPreviousPage": false\n\
},\n\
"edges": []\n\
}\n\
}\n\
}\n\
}\n\
}
# ====================================================================
#
# Query
#
# ====================================================================
query=type Query {\n\
viewer: User\n\
}
user=type User {\n\
project(name: String!): Project\n\
projects(first: Int, after: String, last: Int, before: String): UserProjectConnection\n\
ePackage(nsURI: String!): EPackage\n\
ePackages(first: Int, after: String, last: Int, before: String, includeDefaultEPackages: Boolean): UserEPackageConnection\n\
viewpoint(identifier: String!): Viewpoint\n\
viewpoints(first: Int, after: String, last: Int, before: String): UserViewpointConnection\n\
}
pageInfo=type PageInfo {\n\
hasPreviousPage: Boolean!\n\
hasNextPage: Boolean!\n\
}
# ====================================================================
#
# Mutation
#
# ====================================================================
mutation=type Mutation {\n\
createProject(description: ProjectCreationDescription!): Project\n\
createFolder(projectName: String!, containerPath: String!, name: String!): Folder\n\
createFile(projectName: String!, containerPath: String!, description: FileCreationDescription!): File\n\
activateViewpoint(projectName: String!, viewpointIdentifier: String!): Project\n\
deactivateViewpoint(projectName: String!, viewpointIdentifier: String!): Project\n\
createRepresentation(projectName: String!, resourcePath: String!, description: RepresentationCreationDescription!): Project\n\
}
fileCreationDescription=input FileCreationDescription {\n\
kind: String!\n\
name: String!\n\
}
representationCreationDescription=input RepresentationCreationDescription {\n\
viewpointIdentifier: String!\n\
representationIdentifier: String!\n\
eObjectFragment: String!\n\
name: String!\n\
}
# ====================================================================
#
# Workspace Domain
#
# ====================================================================
resource=interface Resource {\n\
name: String!\n\
path: String!\n\
container: Container\n\
project: Project!\n\
}
container=interface Container {\n\
resources(first: Int, after: String, last: Int, before: String): ContainerResourceConnection\n\
}
project=type Project implements Resource, Container {\n\
name: String!\n\
path: String!\n\
container: Container\n\
project: Project!\n\
resources(first: Int, after: String, last: Int, before: String): ContainerResourceConnection\n\
description: String\n\
resourceByPath(path: String!): Resource\n\
activatedViewpoints(first: Int, after: String, last: Int, before: String): ProjectViewpointConnection\n\
}
folder=type Folder implements Resource, Container {\n\
name: String!\n\
path: String!\n\
container: Container\n\
project: Project!\n\
resources(first: Int, after: String, last: Int, before: String): ContainerResourceConnection\n\
}
file=type File implements Resource {\n\
name: String!\n\
path: String!\n\
container: Container\n\
project: Project!\n\
representations(first: Int, after: String, last: Int, before: String): FileRepresentationConnection\n\
eObjects(first: Int, after: String, last: Int, before: String): FileEObjectConnection\n\
}
# ====================================================================
#
# Sirius Domain
#
# ====================================================================
viewpoint=type Viewpoint {\n\
identifier: String!\n\
name: String!\n\
representationDescriptions(first: Int, after: String, last: Int, before: String): ViewpointRepresentationDescriptionConnection\n\
}
representationDescription=interface RepresentationDescription {\n\
identifier: String!\n\
name: String!\n\
viewpoint: Viewpoint!\n\
ePackages(first: Int, after: String, last: Int, before: String): RepresentationDescriptionEPackageConnection\n\
}
diagramDescription=type DiagramDescription implements RepresentationDescription {\n\
identifier: String!\n\
name: String!\n\
viewpoint: Viewpoint!\n\
ePackages(first: Int, after: String, last: Int, before: String): RepresentationDescriptionEPackageConnection\n\
}
representation=interface Representation {\n\
name: String!\n\
}
diagram=type Diagram implements Representation {\n\
name: String!\n\
description: DiagramDescription!\n\
}
# ====================================================================
#
# EMF Domain
#
# ====================================================================
eObject=interface EObject {\n\
}
eModelElement=interface EModelElement {\n\
eAnnotations: [EAnnotation!]!\n\
}
eNamedElement=interface ENamedElement {\n\
eAnnotations: [EAnnotation!]!\n\
name: String\n\
}
eClassifier=interface EClassifier {\n\
eAnnotations: [EAnnotation!]!\n\
name: String\n\
instanceClassName: String\n\
instanceTypeName: String\n\
ePackage: EPackage\n\
eTypeParameters: [ETypeParameter!]!\n\
}
eClass=type EClass implements EClassifier, ENamedElement, EModelElement, EObject {\n\
eAnnotations: [EAnnotation!]!\n\
name: String\n\
instanceClassName: String\n\
instanceTypeName: String\n\
ePackage: EPackage\n\
eTypeParameters: [ETypeParameter!]!\n\
abstract: Boolean!\n\
interface: Boolean!\n\
eSuperTypes: [EClass!]!\n\
eOperations: [EOperation!]!\n\
eAllAttributes: [EAttribute!]!\n\
eAllReferences: [EReference!]!\n\
eReferences: [EReference!]!\n\
eAttributes: [EAttribute!]!\n\
eAllContainments: [EReference!]!\n\
eAllOperations: [EOperation!]!\n\
eAllStructuralFeatures: [EStructuralFeature!]!\n\
eAllSuperTypes: [EClass!]!\n\
eIDAttribute: EAttribute\n\
eStructuralFeatures: [EStructuralFeature!]!\n\
eGenericSuperTypes: [EGenericType!]!\n\
eAllGenericSuperTypes: [EGenericType!]!\n\
}
eTypedElement=interface ETypedElement {\n\
eAnnotations: [EAnnotation!]!\n\
name: String\n\
ordered: Boolean!\n\
unique: Boolean!\n\
lowerBound: Int!\n\
upperBound: Int!\n\
many: Boolean!\n\
required: Boolean!\n\
eType: EClassifier\n\
eGenericType: EGenericType\n\
}
eStructuralFeature=interface EStructuralFeature {\n\
eAnnotations: [EAnnotation!]!\n\
name: String\n\
ordered: Boolean!\n\
unique: Boolean!\n\
lowerBound: Int!\n\
upperBound: Int!\n\
many: Boolean!\n\
required: Boolean!\n\
eType: EClassifier\n\
eGenericType: EGenericType\n\
changeable: Boolean!\n\
volatile: Boolean!\n\
transient: Boolean!\n\
defaultValueLiteral: String\n\
unsettable: Boolean!\n\
derived: Boolean!\n\
eContainingClass: EClass\n\
}
eAttribute=type EAttribute implements EStructuralFeature, ETypedElement, ENamedElement, EModelElement, EObject {\n\
eAnnotations: [EAnnotation!]!\n\
name: String\n\
ordered: Boolean!\n\
unique: Boolean!\n\
lowerBound: Int!\n\
upperBound: Int!\n\
many: Boolean!\n\
required: Boolean!\n\
eType: EClassifier\n\
eGenericType: EGenericType\n\
changeable: Boolean!\n\
volatile: Boolean!\n\
transient: Boolean!\n\
defaultValueLiteral: String\n\
unsettable: Boolean!\n\
derived: Boolean!\n\
eContainingClass: EClass\n\
iD: Boolean!\n\
eAttributeType: EDataType\n\
}
eReference=type EReference implements EStructuralFeature, ETypedElement, ENamedElement, EModelElement, EObject {\n\
eAnnotations: [EAnnotation!]!\n\
name: String\n\
ordered: Boolean!\n\
unique: Boolean!\n\
lowerBound: Int!\n\
upperBound: Int!\n\
many: Boolean!\n\
required: Boolean!\n\
eType: EClassifier\n\
eGenericType: EGenericType\n\
changeable: Boolean!\n\
volatile: Boolean!\n\
transient: Boolean!\n\
defaultValueLiteral: String\n\
unsettable: Boolean!\n\
derived: Boolean!\n\
eContainingClass: EClass\n\
containment: Boolean!\n\
container: Boolean!\n\
resolveProxies: Boolean!\n\
eOpposite: EReference\n\
eReferenceType: EClass\n\
eKeys: [EAttribute!]!\n\
}
library=type Library implements Addressable, EObject {\n\
address: String\n\
name: String\n\
writers: [Writer!]!\n\
employees: [Employee!]!\n\
borrowers: [Borrower!]!\n\
stock: [Item!]!\n\
books: [Book!]!\n\
branches: [Library!]!\n\
parentBranch: Library\n\
}
book=type Book implements CirculatingItem, Lendable, Item, EObject {\n\
publicationDate: EDate\n\
copies: Int!\n\
borrowers: [Borrower!]!\n\
title: String\n\
pages: Int!\n\
category: BookCategory\n\
author: Writer\n\
}