-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6732878
Showing
15 changed files
with
8,840 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"presets": [ | ||
"@vue/app" | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
module.exports = { | ||
root: true, | ||
extends: [ | ||
`plugin:vue/recommended`, | ||
`@avalanche/eslint-config`, | ||
], | ||
rules: { | ||
'no-console': process.env.NODE_ENV === `production` ? `error` : `warn`, | ||
'no-debugger': process.env.NODE_ENV === `production` ? `error` : `warn`, | ||
'vue/component-name-in-template-casing': [`error`, | ||
`PascalCase`, | ||
], | ||
'vue/no-v-html': false, | ||
'vue/html-closing-bracket-spacing': [`error`, { | ||
startTag: `never`, | ||
endTag: `never`, | ||
selfClosingTag: `never`, | ||
}], | ||
}, | ||
parserOptions: { | ||
parser: `babel-eslint`, | ||
}, | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Numerous always-ignore extensions | ||
*.diff | ||
*.err | ||
*.log | ||
*.orig | ||
*.rej | ||
*.swo | ||
*.swp | ||
*.tgz | ||
*.vi | ||
*.zip | ||
*~ | ||
|
||
# OS or Editor folders | ||
._* | ||
.cache | ||
.DS_Store | ||
.idea | ||
.project | ||
.settings | ||
.tmproj | ||
*.esproj | ||
*.sublime-project | ||
*.sublime-workspace | ||
nbproject | ||
Thumbs.db | ||
|
||
# Folders to ignore | ||
dist/* | ||
node_modules |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"plugins": { | ||
"autoprefixer": {} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# How to Use GraphQL with Vue Apollo Components and Netlify Functions | ||
|
||
[![Patreon](https://img.shields.io/badge/patreon-donate-blue.svg)](https://www.patreon.com/maoberlehner) | ||
[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://paypal.me/maoberlehner) | ||
|
||
This is an example project for the following article: [How to Use GraphQL with Vue Apollo Components and Netlify Functions](https://markus.oberlehner.net/blog/how-to-use-graphql-with-vue-apollo-components-and-netlify-functions/) | ||
|
||
## Build Setup | ||
|
||
```bash | ||
# Install dependencies. | ||
npm install | ||
|
||
# Serve with hot reload. | ||
npm run serve | ||
|
||
# Build for production with minification. | ||
npm run build | ||
``` | ||
|
||
## About | ||
|
||
### Author | ||
|
||
Markus Oberlehner | ||
Website: https://markus.oberlehner.net | ||
Twitter: https://twitter.com/MaOberlehner | ||
PayPal.me: https://paypal.me/maoberlehner | ||
Patreon: https://www.patreon.com/maoberlehner | ||
|
||
### License | ||
|
||
MIT |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"name": "how-to-use-graphql-with-vue-apollo-components-and-netlify-functions", | ||
"version": "0.1.0", | ||
"author": "Markus Oberlehner", | ||
"homepage": "https://github.com/maoberlehner/how-to-use-graphql-with-vue-apollo-components-and-netlify-functions", | ||
"license": "MIT", | ||
"private": true, | ||
"scripts": { | ||
"serve": "vue-cli-service serve", | ||
"build": "vue-cli-service build", | ||
"lint": "vue-cli-service lint" | ||
}, | ||
"dependencies": { | ||
"@avalanche/generic-box-sizing-reset": "^4.0.0-alpha.5", | ||
"@avalanche/object-container": "^4.0.0-alpha.8", | ||
"@avalanche/object-vertical-spacing": "^4.0.0-alpha.5", | ||
"@avalanche/setting-spacings": "^4.0.0-alpha.6", | ||
"@vue/cli-plugin-babel": "^3.3.0", | ||
"@vue/cli-service": "^3.3.0", | ||
"node-sass": "^4.11.0", | ||
"node-sass-magic-importer": "^5.3.0", | ||
"reset-css": "^4.0.1", | ||
"sass-loader": "^7.1.0", | ||
"vue": "^2.5.22", | ||
"vue-template-compiler": "^2.5.22" | ||
}, | ||
"devDependencies": { | ||
"@avalanche/eslint-config": "^3.0.0", | ||
"@vue/cli-plugin-eslint": "^3.3.0", | ||
"eslint-plugin-import": "^2.14.0", | ||
"eslint-plugin-vue": "^5.1.0" | ||
}, | ||
"browserslist": [ | ||
">0.25%", | ||
"not ie 10", | ||
"not op_mini all" | ||
] | ||
} |
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0"> | ||
<title>How to Use GraphQL with Vue Apollo Components and Netlify Functions</title> | ||
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> | ||
</head> | ||
|
||
<body> | ||
<div id="app"></div> | ||
<!-- built files will be auto injected --> | ||
</body> | ||
</html> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<template> | ||
<div class="App o-container o-container--s o-vertical-spacing o-vertical-spacing--xl"> | ||
<h1>How to Use GraphQL with Vue Apollo Components and Netlify Functions</h1> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: `App`, | ||
}; | ||
</script> | ||
|
||
<style lang="scss"> | ||
@import './assets/scss/settings/**/*'; | ||
@import './assets/scss/generic/**/*'; | ||
@import '{ | ||
.o-container, | ||
.o-container--s, | ||
} from ~@avalanche/object-container'; | ||
@import '{ | ||
.o-vertical-spacing, | ||
.o-vertical-spacing--xl, | ||
} from ~@avalanche/object-vertical-spacing'; | ||
.App { | ||
padding-top: setting-spacing(xl); | ||
padding-bottom: setting-spacing(xl); | ||
h1 { | ||
text-align: center; | ||
} | ||
} | ||
</style> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
@import '~@avalanche/generic-box-sizing-reset'; | ||
@import '~reset-css/sass/reset'; | ||
|
||
// 1. Usually a larger line height is beneficial | ||
// for blocks of text, but we want to have a | ||
// rather small line height for our basic UI | ||
// elements so we can apply uniform spacings | ||
// using margins and paddings. We'll add an | ||
// extra CSS class with a larger line height | ||
// to apply to blocks of text. | ||
// 2. A kind of “dirty” white is more pleasing | ||
// to the eyes. | ||
// 3. A kind of “almost black but not quite black” | ||
// is also more pleasing to the eyes. | ||
body { | ||
line-height: 1.25; // 1 | ||
background-color: #f9f9f9; // 2 | ||
color: #222; // 3 | ||
font-family: sans-serif; | ||
} | ||
|
||
// 1. Larger font sizes need less line height. | ||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5 { | ||
line-height: 1.2; // 1 | ||
font-weight: 700; | ||
} | ||
|
||
h1 { | ||
font-size: 2.027em; | ||
} | ||
|
||
h2 { | ||
font-size: 1.802em; | ||
} | ||
|
||
h3 { | ||
font-size: 1.602em; | ||
} | ||
|
||
h4 { | ||
font-size: 1.424em; | ||
} | ||
|
||
h5 { | ||
font-size: 1.266em; | ||
} | ||
|
||
h6 { | ||
font-size: 1.125em; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@import '~@avalanche/setting-spacings'; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import Vue from 'vue'; | ||
|
||
import App from './App.vue'; | ||
|
||
Vue.config.productionTip = false; | ||
|
||
new Vue({ | ||
render: h => h(App), | ||
}).$mount(`#app`); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const nodeSassMagicImporter = require(`node-sass-magic-importer`); | ||
|
||
module.exports = { | ||
css: { | ||
loaderOptions: { | ||
sass: { | ||
importer: nodeSassMagicImporter(), | ||
}, | ||
}, | ||
}, | ||
lintOnSave: false, | ||
}; |
Oops, something went wrong.