Skip to content

Commit

Permalink
Switch cars for recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
fabien-roy committed May 7, 2022
1 parent 21e3680 commit e77afaa
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 121 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Build](https://github.com/ExiledNarwal28/nuxt3-template/actions/workflows/build.yml/badge.svg)](https://github.com/ExiledNarwal28/nuxt3-template/actions/workflows/build.yml)

Simple [Nuxt 3](https://v3.nuxtjs.org/) and [Apollo](https://www.apollographql.com/) Template about cars.
Simple [Nuxt 3](https://v3.nuxtjs.org/) and [Apollo](https://www.apollographql.com/) Template about recipes.

Made with love by [Fabien Roy](https://github.com/ExiledNarwal28).

Expand Down
2 changes: 1 addition & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Features
- Add more queries
- Add mutations
- Add i18n translations (see: https://github.com/intlify/nuxt3)
- Add styles (style-component?)
- Add styles (styled-components?)
- Add 404 page (and general error handling)

Docs
Expand Down
2 changes: 1 addition & 1 deletion app.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<h1>Nuxt 3 Template</h1>
<sub>A simple app about cars.</sub>
<sub>A simple app about recipes.</sub>
<NuxtPage />
</div>
</template>
8 changes: 0 additions & 8 deletions graphql/car.query.gql

This file was deleted.

50 changes: 0 additions & 50 deletions pages/cars/[id].vue

This file was deleted.

6 changes: 0 additions & 6 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ definePageMeta({
<template>
<div>
<h2>Yao, welcome m8</h2>
<div>
<NuxtLink to="/cars/1">Go to car with id '1'</NuxtLink>
</div>
<div>
<NuxtLink to="/cars/2">Go to car with id '2'</NuxtLink>
</div>
<div>
<NuxtLink to="/recipes/1">Go to recipe with id '1'</NuxtLink>
</div>
Expand Down
8 changes: 4 additions & 4 deletions pages/recipes/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const recipe = computed(() => result?.value?.recipe);
/*
definePageMeta({
title: car ? `Car with id ${car.id}` : '...',
title: recipe ? `Recipe with id ${recipe.id}` : '...',
});
*/
</script>
Expand All @@ -30,9 +30,9 @@ definePageMeta({
{{ recipe.title }}
</span>
</div>
<div>
<NuxtLink to="/">Go back home</NuxtLink>
</div>
</div>
<div>
<NuxtLink to="/">Go back home</NuxtLink>
</div>
</div>
</template>
26 changes: 0 additions & 26 deletions server/graphql/cars/car.resolver.ts

This file was deleted.

22 changes: 0 additions & 22 deletions server/graphql/cars/schema.ts

This file was deleted.

3 changes: 1 addition & 2 deletions server/graphql/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import type { NonEmptyArray } from 'type-graphql';
import car from './cars/car.resolver';
import recipe from './recipes/recipe.resolver';

// TODO: Do we need this disable?
// eslint-disable-next-line @typescript-eslint/ban-types
const resolvers: NonEmptyArray<Function> = [car, recipe];
const resolvers: NonEmptyArray<Function> = [recipe];

export default resolvers;

0 comments on commit e77afaa

Please sign in to comment.