Skip to content
Snippets Groups Projects
Commit b9e19b91 authored by stevereis's avatar stevereis
Browse files

Edit : update model graphql

parent 29428a66
No related branches found
No related tags found
No related merge requests found
...@@ -29,7 +29,7 @@ export class EngineResolver { ...@@ -29,7 +29,7 @@ export class EngineResolver {
} }
@Query(() => ListExperiments) @Query(() => ListExperiments)
async experiments( async experimentList(
@Args('page', { nullable: true, defaultValue: 0 }) page: number, @Args('page', { nullable: true, defaultValue: 0 }) page: number,
@Args('name', { nullable: true, defaultValue: '' }) name: string, @Args('name', { nullable: true, defaultValue: '' }) name: string,
) { ) {
......
...@@ -5,8 +5,11 @@ import { Author } from './author.model'; ...@@ -5,8 +5,11 @@ import { Author } from './author.model';
@ObjectType() @ObjectType()
export class Experiment { export class Experiment {
@Field({ nullable: true }) @Field()
id?: string; id: string;
@Field()
name: string;
@Field(() => Author, { nullable: true, defaultValue: '' }) @Field(() => Author, { nullable: true, defaultValue: '' })
author?: Author; author?: Author;
...@@ -52,9 +55,6 @@ export class Experiment { ...@@ -52,9 +55,6 @@ export class Experiment {
@Field() @Field()
algorithm: Algorithm; algorithm: Algorithm;
@Field()
name: string;
} }
@ObjectType() @ObjectType()
......
...@@ -132,7 +132,8 @@ type Author { ...@@ -132,7 +132,8 @@ type Author {
} }
type Experiment { type Experiment {
id: String id: String!
name: String!
author: Author author: Author
createdAt: Float createdAt: Float
updateAt: Float updateAt: Float
...@@ -148,11 +149,11 @@ type Experiment { ...@@ -148,11 +149,11 @@ type Experiment {
coVariables: [String!] coVariables: [String!]
filterVariables: [String!] filterVariables: [String!]
algorithm: Algorithm! algorithm: Algorithm!
name: String!
} }
type PartialExperiment { type PartialExperiment {
id: String id: String
name: String
author: Author author: Author
createdAt: Float createdAt: Float
updateAt: Float updateAt: Float
...@@ -168,7 +169,6 @@ type PartialExperiment { ...@@ -168,7 +169,6 @@ type PartialExperiment {
coVariables: [String!] coVariables: [String!]
filterVariables: [String!] filterVariables: [String!]
algorithm: Algorithm algorithm: Algorithm
name: String
} }
type ListExperiments { type ListExperiments {
...@@ -180,7 +180,7 @@ type ListExperiments { ...@@ -180,7 +180,7 @@ type ListExperiments {
type Query { type Query {
domains(ids: [String!] = []): [Domain!]! domains(ids: [String!] = []): [Domain!]!
experiments(name: String = "", page: Float = 0): ListExperiments! experimentList(name: String = "", page: Float = 0): ListExperiments!
experiment(id: String!): Experiment! experiment(id: String!): Experiment!
algorithms: [Algorithm!]! algorithms: [Algorithm!]!
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment