Skip to content

Instantly share code, notes, and snippets.

@pie6k
Last active April 20, 2018 10:59
Show Gist options
  • Save pie6k/3225462dfdb47e30b0457692abe4f0b6 to your computer and use it in GitHub Desktop.
Save pie6k/3225462dfdb47e30b0457692abe4f0b6 to your computer and use it in GitHub Desktop.
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