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 {DocumentNode} from 'graphql'; | |
import {Module} from '@nestjs/common'; | |
import { TeslaModule } from './tesla/tesla.module'; | |
import * as fs from 'fs'; | |
import glob = require('glob'); | |
@Module({ | |
imports: [ | |
TeslaModule | |
], |
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 {NestFactory} from '@nestjs/core'; | |
import {INestApplicationContext} from '@nestjs/common'; | |
import {AppModule} from './app/app.module'; | |
import {ApolloServer} from 'apollo-server-cloud-functions'; | |
export let context: INestApplicationContext; | |
export async function bootstrap(): Promise<any> { | |
context = await NestFactory.createApplicationContext(AppModule); // Initialize Nest without starting a server (because we're running in GCloud functions) | |
const app = context.get(AppModule); |
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 {Module} from '@nestjs/common'; | |
import {Tesla, Wheel} from '../../generated/graphql-types'; | |
import shortid = require('shortid'); | |
class IResolvers { | |
} | |
@Module({ | |
providers: [], | |
exports: [] |
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 Tesla { | |
id: ID! | |
model: String | |
edition: String | |
kwh: Int | |
range: Int | |
wheels: Wheel | |
} | |
type Wheel { |
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 {Injectable, Module} from '@nestjs/common'; | |
import {NestFactory} from '@nestjs/core'; | |
@Injectable() | |
export class SlowService { | |
constructor() { | |
console.log(`Created SlowService`); | |
} | |
} |
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 {Injectable, Module} from '@nestjs/common'; | |
import {NestFactory} from '@nestjs/core'; | |
@Injectable() | |
export class SlowService { | |
constructor() { | |
console.log(`Created SlowService`); | |
} | |
} |
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
export class CompleteFlow implements Flow { | |
createConfiguration(): Promise<ProductConfiguration> { | |
// blijft hetzelfde? | |
return undefined; | |
} | |
getOptions(): Promise<ProductConfigurationOption> { | |
// is anders per flow | |
return undefined; |
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
name: Deploy | |
on: | |
push: | |
tags: | |
- '**' | |
env: | |
RUN_REGION: europe-west1 | |
SERVICE_NAME: api |
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
<template> | |
<div> | |
<div v-for="product in $page.Vendure.products.items" > | |
<img :src="product.featuredAsset.preview" class="thumbnail" /> | |
<p :class="product.soldOut ? 'sold-out' : ''" class="product-title">{{ product.name }}</p> | |
<p :class="product.soldOut ? 'sold-out' : ''">{{ product.variants[0].priceWithTax }}</p> | |
<p v-if="product.soldOut">SOLD OUT</p> | |
</div> | |
</div> | |
</template> |
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
<template> | |
<!-- Geef string door aan component. hetzelfde als standaard HTML attributen --> | |
<ProductCard | |
title="Dit wordt de titel" | |
/> | |
<!-- Geef een variabele door aan component --> | |
<ProductCard | |
:title="productName" |
OlderNewer