This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // type Folder = [number, Array<number>, string]; // [id, subfolders_ids, folder_name] | |
| const list = [ | |
| [0, [7, 3], "abc"], | |
| [0, [], "xyz"], | |
| [3, [], "pqr"], | |
| [11, [8], "pqr"], | |
| [8, [], "def"], | |
| [7, [9], "ijk"], | |
| [9, [], "lmn"], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { join } = require('path'); | |
| const { config } = require('./wdio.conf'); | |
| config.cucumberOpts.require = ['./e2e/tests/steps/**/*.steps.js']; | |
| config.capabilities = [ | |
| { | |
| platformName: 'Android', | |
| maxInstances: 1, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { argv } = require('yargs'); | |
| const timeout = argv.timeout || 90 * 1000; | |
| const selectedSpecs = []; | |
| selectedSpecs.push( | |
| `./e2e/tests/features/**/*.feature` | |
| ); | |
| exports.config = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import "dotenv/config"; | |
| import { GraphQLServer } from "graphql-yoga"; | |
| import DatabaseBootstrap from './database'; | |
| import schema from './schema'; | |
| async function bootstrap() { | |
| const server = new GraphQLServer({ | |
| schema: await schema, | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { buildSchema } from 'type-graphql'; | |
| import path from 'path'; | |
| const schema = buildSchema({ | |
| resolvers: [path.join(__dirname, './animals', `**/*-resolver.*s`)], | |
| validate: false, | |
| }); | |
| export default schema; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Resolver, Arg, Query, Mutation } from "type-graphql"; | |
| import { Animal } from "../entities/animals"; | |
| import { AnimalInput } from "../types/animals"; | |
| import { AnimalService } from "../service"; | |
| @Resolver() | |
| export class AnimalResolver { | |
| private readonly service: AnimalService; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { BaseService } from "../../base"; | |
| import { Animal, AnimalModel } from "../entities/animals"; | |
| export class AnimalService extends BaseService<Animal> { | |
| constructor() { | |
| super(); | |
| this.model = AnimalModel; | |
| } | |
| async findAllAnimalsAndPickOne() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { DocumentType, ReturnModelType } from "@typegoose/typegoose"; | |
| import { DocumentQuery, CreateQuery, Types } from 'mongoose'; | |
| import { AnyParamConstructor } from '@typegoose/typegoose/lib/types'; | |
| type QueryList<T> = DocumentQuery< | |
| Array<DocumentType<T>>, | |
| DocumentType<T> | |
| >; | |
| type QueryItem<T> = DocumentQuery< |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Field, InputType } from 'type-graphql'; | |
| @InputType() | |
| export class AnimalInput { | |
| @Field() | |
| animal: string; | |
| @Field() | |
| emoji: string; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Field, ObjectType, ID } from 'type-graphql'; | |
| import { prop as Property, getModelForClass } from '@typegoose/typegoose'; | |
| @ObjectType({ description: "The Animal Model" }) | |
| export class Animal { | |
| @Field(() => ID) | |
| readonly id: string; | |
| @Field() | |
| @Property({ required: true }) |
NewerOlder