✨ Add basic graphql API using strawberry 🍓

✨ Add allProducts query
This commit is contained in:
nikolark committed 2021-10-30 16:54:28 +02:00
1 parent e2db9052bc
commit fa89353525
12 files changed
+215 -114

No files matched your search

+3 -38
View File
@@ -1,42 +1,7 @@
.App {
text-align: center;
}
.App-logo {
height: 40vmin;
.logo {
width: 100px;
pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;
}
}
.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}
.App-link {
color: #61dafb;
}
@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
button {
font-size: calc(10px + 2vmin);
}
}
+7 -37
View File
@@ -1,43 +1,13 @@
import { useState } from 'react'
import logo from './brick.svg'
import './App.css'
import React from 'react'
import logo from './assets/brick.svg';
import styles from './App.module.css'
function App() {
const [count, setCount] = useState(0)
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>Hello Vite + React!</p>
<p>
<button type="button" onClick={() => setCount((count) => count + 1)}>
count is: {count}
</button>
</p>
<p>
Edit <code>App.tsx</code> and save to test HMR updates.
</p>
<p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
{' | '}
<a
className="App-link"
href="https://vitejs.dev/guide/features.html"
target="_blank"
rel="noopener noreferrer"
>
Vite Docs
</a>
</p>
</header>
<div className={styles.app}>
<img src={logo} className={styles.logo} alt="logo" />
</div>
)
}
-13
View File
@@ -1,13 +0,0 @@
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}
-1
View File
@@ -1,6 +1,5 @@
import React from 'react'
import ReactDOM from 'react-dom'
import './index.css'
import App from './App'
ReactDOM.render(
+5
View File
@@ -0,0 +1,5 @@
declare module "*.svg" {
const content: any;
export default content;
}
declare module "*.module.css";