Skip to content

Commit

Permalink
Graphql & apollo server architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastp committed Nov 10, 2019
1 parent f764299 commit a55ac2e
Show file tree
Hide file tree
Showing 14 changed files with 704 additions and 53 deletions.
11 changes: 6 additions & 5 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.cache
package.json
package-lock.json
public
styles/base
.cache
package.json
package-lock.json
public
styles/base
styles/vendors
18 changes: 9 additions & 9 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"plugins": [
"stylelint-scss"
],
"extends": "stylelint-config-standard",
"ignoreFiles": "./styles/base/**",
"rules": {
"color-hex-length": "long"
}
{
"plugins": [
"stylelint-scss"
],
"extends": "stylelint-config-standard",
"ignoreFiles": ["./styles/base/**", "./styles/vendors/**"],
"rules": {
"color-hex-length": "long"
}
}
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,8 @@ https://github.com/Sly777/ran
https://github.com/tomanagle/Apollo-Next.js-GraphQL-starter
https://github.com/atherosai/next-react-graphql-apollo-hooks

/_
"paths": {
"@generated/_": ["../generated/*"],
"@graphql/_": ["../graphql/_"],
"@views/_": ["./_"],
"@utils/_": ["../utils/_"]
}
\*/
To read later;
https://devstore.io/js/graphql-tag

Check out this to read more about /server/graphql workings
https://github.com/Urigo/merge-graphql-schemas
12 changes: 12 additions & 0 deletions graphql/queries/example.gql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
query MyQuery1 {
user {
id
}
}

query MyQuery2 {
user {
name
lastName
}
}
2 changes: 1 addition & 1 deletion graphql/query.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import gql from 'graphql-tag'

//import { MyQuery1, MyQuery2 } from 'query.gql'
export const meQuery = gql`
query {
allUsers {
Expand Down
6 changes: 6 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ const configureWebpack = (config, { dev }) => {
);


config.module.rules.push({
test: /\.(graphql|gql)$/,
exclude: /node_modules/,
loader: 'graphql-tag/loader'
})

if (dev) {
config.module.rules.push({
test: /\.jsx?$/,
Expand Down
Loading

0 comments on commit a55ac2e

Please sign in to comment.