Last active
April 20, 2018 10:59
-
-
Save pie6k/3225462dfdb47e30b0457692abe4f0b6 to your computer and use it in GitHub Desktop.
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 { Schema, Query } from 'typegql'; | |
import { Product } from './product.ts' | |
@Schema() | |
export class FirstSchema { | |
@Query() | |
findProductById(id: number): Product { | |
const foundProduct = new Product(); | |
foundProduct.id = id; | |
foundProduct.price = 90; | |
return foundProduct; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment