diff --git a/.gitignore b/.gitignore index 922d92a..0003480 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,6 @@ npm-debug.log* yarn-debug.log* yarn-error.log* + +# cms +cms diff --git a/README.md b/README.md index 02f79a5..42a7def 100644 --- a/README.md +++ b/README.md @@ -1,80 +1,6 @@ -### This is a next-apollo-graphql setup to start develop your web site. This setup uses server side rendering. - - -## 🚀 Getting Started - -To start the development server, you need to run the following commands below. - -### Using Node -```bash -npm install -npm run dev -``` -Open http://localhost:3000 with your browser to see the result. - -Our application runs on port `3000`, and GraphQL server also runs on `localhost:3000/api/graphql`. - -### Using Nginx -```bash -docker-compose build && docker-compose up -``` -Our application runs on port `80`, and GraphQL server also runs on `localhost:80/api/graphql`. - -## ⚡ Using Query - -You can easily use `Query` component to send queries to the GraphQL server. Just pass your query to the `Query` component. -```jsx - - {({ data: { articles } }) => { - return ; - }} - -``` - -Use the `withData` HOC to wrap your pages. -```jsx - -// ./frontend/pages/articles.js -import Layout from '../components/Layout/Layout' -import SEO from '../components/SEO/SEO' -import Query from '../components/Query/query' -import ARTICLES_QUERY from '../apollo/queries/articles/articles'; -import withData from '../lib/apollo'; - - -const Articles = () => { - return ( - <> - - -

Articles page

-
- - {({ data: { articles } }) => { - return articles.map(art => { - return ( -
-

- title: {art.title}
- id: {art.id} -

-
- ) - }) - }} -
-
-
- - ) - -} - -export default withData(Articles) - -``` -## License: -[MIT](https://github.com/sergeyyarkov/next-apollo-graphql-setup/blob/master/LICENSE) +### This is a next-strapi-mongo setup to start develop your web site. This setup uses server side rendering. + + diff --git a/apolloClient.js b/apolloClient.js new file mode 100644 index 0000000..efafcff --- /dev/null +++ b/apolloClient.js @@ -0,0 +1,18 @@ +import { ApolloClient } from 'apollo-client' +import { InMemoryCache } from 'apollo-cache-inmemory' +import { HttpLink } from 'apollo-link-http' +import fetch from 'isomorphic-unfetch' + +export default function createApolloClient (initialState, ctx) { + // The `ctx` (NextPageContext) will only be present on the server. + // use it to extract auth headers (ctx.req) or similar. + return new ApolloClient({ + ssrMode: Boolean(ctx), + link: new HttpLink({ + uri: 'https://next-blog-example.herokuapp.com/graphql', // Server URL (must be absolute) + credentials: 'same-origin', // Additional fetch() options like `credentials` or `headers` + fetch + }), + cache: new InMemoryCache().restore(initialState) + }) +} diff --git a/docker-compose.yml b/docker-compose.yml index e086e7a..05badd2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,4 +11,30 @@ services: restart: unless-stopped build: nginx ports: - - '80:80' \ No newline at end of file + - '80:80' + strapi: + container_name: strapi + image: strapi/strapi + environment: + - DATABASE_CLIENT=mongo + - DATABASE_HOST=db + - DATABASE_PORT=27017 + - DATABASE_NAME=strapi + - DATABASE_USERNAME= + - DATABASE_PASSWORD= + - DATABASE_AUTHENTICATION_DATABASE=strapi + ports: + - '1337:1337' + volumes: + - ./cms:/srv/app + depends_on: + - db + + db: + container_name: mongo + image: mongo + environment: + - MONGO_INITDB_DATABASE=strapi + ports: + - '27017' + restart: always \ No newline at end of file diff --git a/graphql/data/index.js b/graphql/data/index.js deleted file mode 100644 index 7e2241f..0000000 --- a/graphql/data/index.js +++ /dev/null @@ -1,11 +0,0 @@ -const articles = [ - { id: 1, title: 'Article 1' }, - { id: 2, title: 'Article 2' }, - { id: 3, title: 'Article 3' }, - { id: 4, title: 'Article 4' }, - { id: 5, title: 'Article 5' } -] - -module.exports = { - articles -} diff --git a/graphql/index.js b/graphql/index.js deleted file mode 100644 index 5b24eb2..0000000 --- a/graphql/index.js +++ /dev/null @@ -1,8 +0,0 @@ -import { makeExecutableSchema } from 'graphql-tools' -import { typeDefs } from './typeDefs' -import { resolvers } from './resolvers' - -export const schema = makeExecutableSchema({ - typeDefs, - resolvers -}) diff --git a/graphql/models/Article.js b/graphql/models/Article.js deleted file mode 100644 index de87c54..0000000 --- a/graphql/models/Article.js +++ /dev/null @@ -1,11 +0,0 @@ -const { articles } = require('../data') - -class Article { - static all () { - return articles - } -} - -module.exports = { - Article -} diff --git a/graphql/models/index.js b/graphql/models/index.js deleted file mode 100644 index 68934a8..0000000 --- a/graphql/models/index.js +++ /dev/null @@ -1,5 +0,0 @@ -const { Article } = require('./Article') - -module.exports = { - Article -} diff --git a/graphql/resolvers/articlesResolvers.js b/graphql/resolvers/articlesResolvers.js deleted file mode 100644 index 3f531c6..0000000 --- a/graphql/resolvers/articlesResolvers.js +++ /dev/null @@ -1,11 +0,0 @@ -const { Article } = require('../models') - -const articlesResolvers = { - Query: { - articles: () => Article.all() - } -} - -module.exports = { - articlesResolvers -} diff --git a/graphql/resolvers/index.js b/graphql/resolvers/index.js deleted file mode 100644 index c5d8135..0000000 --- a/graphql/resolvers/index.js +++ /dev/null @@ -1,7 +0,0 @@ -const { articlesResolvers } = require('./articlesResolvers') - -const resolvers = [articlesResolvers] - -module.exports = { - resolvers -} diff --git a/graphql/typeDefs/index.js b/graphql/typeDefs/index.js deleted file mode 100644 index 4aaf7ac..0000000 --- a/graphql/typeDefs/index.js +++ /dev/null @@ -1,8 +0,0 @@ -const { query } = require('./query') -const { articleType } = require('./types') - -const typeDefs = [query, articleType] - -module.exports = { - typeDefs -} diff --git a/graphql/typeDefs/query.js b/graphql/typeDefs/query.js deleted file mode 100644 index d7e49c4..0000000 --- a/graphql/typeDefs/query.js +++ /dev/null @@ -1,11 +0,0 @@ -const { gql } = require('apollo-boost') - -const query = gql` - type Query { - articles: [Article] - } -` - -module.exports = { - query -} diff --git a/graphql/typeDefs/types/articleType.js b/graphql/typeDefs/types/articleType.js deleted file mode 100644 index d8643cc..0000000 --- a/graphql/typeDefs/types/articleType.js +++ /dev/null @@ -1,12 +0,0 @@ -const { gql } = require('apollo-boost') - -const articleType = gql` - type Article { - id: ID - title: String - } -` - -module.exports = { - articleType -} diff --git a/graphql/typeDefs/types/index.js b/graphql/typeDefs/types/index.js deleted file mode 100644 index a45a45f..0000000 --- a/graphql/typeDefs/types/index.js +++ /dev/null @@ -1,5 +0,0 @@ -const { articleType } = require('./articleType') - -module.exports = { - articleType -} diff --git a/lib/apollo.js b/lib/apollo.js index b8b95b9..c8de9fc 100644 --- a/lib/apollo.js +++ b/lib/apollo.js @@ -1,22 +1,95 @@ import React from 'react' +import App from 'next/app' import Head from 'next/head' import { ApolloProvider } from '@apollo/react-hooks' -import { ApolloClient } from 'apollo-client' -import { InMemoryCache } from 'apollo-cache-inmemory' +import createApolloClient from '../apolloClient' +// On the client, we store the Apollo Client in the following variable. +// This prevents the client from reinitializing between page transitions. let globalApolloClient = null /** - * Creates and provides the apolloContext - * to a next.js PageTree. Use it by wrapping - * your PageComponent via HOC pattern. - * @param {Function|Class} PageComponent - * @param {Object} [config] - * @param {Boolean} [config.ssr=true] + * Installs the Apollo Client on NextPageContext + * or NextAppContext. Useful if you want to use apolloClient + * inside getStaticProps, getStaticPaths or getServerSideProps + * @param {NextPageContext | NextAppContext} ctx */ -export function withApollo (PageComponent, { ssr = true } = {}) { +export const initOnContext = ctx => { + const inAppContext = Boolean(ctx.ctx) + + // We consider installing `withApollo({ ssr: true })` on global App level + // as antipattern since it disables project wide Automatic Static Optimization. + if (process.env.NODE_ENV === 'development') { + if (inAppContext) { + console.warn( + 'Warning: You have opted-out of Automatic Static Optimization due to `withApollo` in `pages/_app`.\n' + + 'Read more: https://err.sh/next.js/opt-out-auto-static-optimization\n' + ) + } + } + + // Initialize ApolloClient if not already done + const apolloClient = + ctx.apolloClient || + initApolloClient(ctx.apolloState || {}, inAppContext ? ctx.ctx : ctx) + + // We send the Apollo Client as a prop to the component to avoid calling initApollo() twice in the server. + // Otherwise, the component would have to call initApollo() again but this + // time without the context. Once that happens, the following code will make sure we send + // the prop as `null` to the browser. + apolloClient.toJSON = () => null + + // Add apolloClient to NextPageContext & NextAppContext. + // This allows us to consume the apolloClient inside our + // custom `getInitialProps({ apolloClient })`. + ctx.apolloClient = apolloClient + if (inAppContext) { + ctx.ctx.apolloClient = apolloClient + } + + return ctx +} + +/** + * Always creates a new apollo client on the server + * Creates or reuses apollo client in the browser. + * @param {NormalizedCacheObject} initialState + * @param {NextPageContext} ctx + */ +const initApolloClient = (initialState, ctx) => { + // Make sure to create a new client for every server-side request so that data + // isn't shared between connections (which would be bad) + if (typeof window === 'undefined') { + return createApolloClient(initialState, ctx) + } + + // Reuse client on the client-side + if (!globalApolloClient) { + globalApolloClient = createApolloClient(initialState, ctx) + } + + return globalApolloClient +} + +/** + * Creates a withApollo HOC + * that provides the apolloContext + * to a next.js Page or AppTree. + * @param {Object} withApolloOptions + * @param {Boolean} [withApolloOptions.ssr=false] + * @returns {(PageComponent: ReactNode) => ReactNode} + */ +export const withApollo = ({ ssr = false } = {}) => PageComponent => { const WithApollo = ({ apolloClient, apolloState, ...pageProps }) => { - const client = apolloClient || initApolloClient(apolloState) + let client + if (apolloClient) { + // Happens on: getDataFromTree & next.js ssr + client = apolloClient + } else { + // Happens on: next.js csr + client = initApolloClient(apolloState, undefined) + } + return ( @@ -28,49 +101,53 @@ export function withApollo (PageComponent, { ssr = true } = {}) { if (process.env.NODE_ENV !== 'production') { const displayName = PageComponent.displayName || PageComponent.name || 'Component' - - if (displayName === 'App') { - console.warn('This withApollo HOC only works with PageComponents.') - } - WithApollo.displayName = `withApollo(${displayName})` } if (ssr || PageComponent.getInitialProps) { WithApollo.getInitialProps = async ctx => { - const { AppTree } = ctx - - // Initialize ApolloClient, add it to the ctx object so - // we can use it in `PageComponent.getInitialProp`. - const apolloClient = (ctx.apolloClient = initApolloClient()) + const inAppContext = Boolean(ctx.ctx) + const { apolloClient } = initOnContext(ctx) // Run wrapped getInitialProps methods let pageProps = {} if (PageComponent.getInitialProps) { pageProps = await PageComponent.getInitialProps(ctx) + } else if (inAppContext) { + pageProps = await App.getInitialProps(ctx) } // Only on the server: if (typeof window === 'undefined') { + const { AppTree } = ctx // When redirecting, the response is finished. // No point in continuing to render if (ctx.res && ctx.res.finished) { return pageProps } - // Only if ssr is enabled - if (ssr) { + // Only if dataFromTree is enabled + if (ssr && AppTree) { try { - // Run all GraphQL queries + // Import `@apollo/react-ssr` dynamically. + // We don't want to have this in our client bundle. const { getDataFromTree } = await import('@apollo/react-ssr') - await getDataFromTree( - - ) + + // Since AppComponents and PageComponents have different context types + // we need to modify their props a little. + let props + if (inAppContext) { + props = { ...pageProps, apolloClient } + } else { + props = { pageProps: { ...pageProps, apolloClient } } + } + + // Take the Next.js AppTree, determine which queries are needed to render, + // and fetch them. This method can be pretty slow since it renders + // your entire AppTree once for every query. Check out apollo fragments + // if you want to reduce the number of rerenders. + // https://www.apollographql.com/docs/react/data/fragments/ + await getDataFromTree() } catch (error) { // Prevent Apollo Client GraphQL errors from crashing SSR. // Handle them in components via the data.error prop: @@ -84,65 +161,16 @@ export function withApollo (PageComponent, { ssr = true } = {}) { } } - // Extract query data from the Apollo store - const apolloState = apolloClient.cache.extract() - return { ...pageProps, - apolloState + // Extract query data from the Apollo store + apolloState: apolloClient.cache.extract(), + // Provide the client for ssr. As soon as this payload + // gets JSON.stringified it will remove itself. + apolloClient: ctx.apolloClient } } } return WithApollo } - -/** - * Always creates a new apollo client on the server - * Creates or reuses apollo client in the browser. - * @param {Object} initialState - */ -function initApolloClient (initialState) { - // Make sure to create a new client for every server-side request so that data - // isn't shared between connections (which would be bad) - if (typeof window === 'undefined') { - return createApolloClient(initialState) - } - - // Reuse client on the client-side - if (!globalApolloClient) { - globalApolloClient = createApolloClient(initialState) - } - - return globalApolloClient -} - -/** - * Creates and configures the ApolloClient - * @param {Object} [initialState={}] - */ -function createApolloClient (initialState = {}) { - const ssrMode = typeof window === 'undefined' - const cache = new InMemoryCache().restore(initialState) - - // Check out https://github.com/zeit/next.js/pull/4611 if you want to use the AWSAppSyncClient - return new ApolloClient({ - ssrMode, - link: createIsomorphLink(), - cache - }) -} - -function createIsomorphLink () { - if (typeof window === 'undefined') { - const { SchemaLink } = require('apollo-link-schema') - const { schema } = require('../graphql') - return new SchemaLink({ schema }) - } else { - const { HttpLink } = require('apollo-link-http') - return new HttpLink({ - uri: '/api/graphql', - credentials: 'same-origin' - }) - } -} diff --git a/nginx/default.conf b/nginx/default.conf index ac232c1..19d7612 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -1,3 +1,4 @@ +# Main server { listen 80; server_name localhost; @@ -15,6 +16,46 @@ server { location = /50x.html { root /usr/share/nginx/html; } - - } + +# CMS +server { + listen 80; + server_name dashboard.localhost; + + location / { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + proxy_pass http://strapi:1337; + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + +} + +# GraphQL +server { + listen 80; + server_name api.localhost; + + location /graphql { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + proxy_pass http://strapi:1337/graphql; + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 62c7468..9e95c8a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -62,6 +62,33 @@ "cross-fetch": "3.0.4" } }, + "@apollo/federation": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/@apollo/federation/-/federation-0.11.2.tgz", + "integrity": "sha512-MSMBGOS9lAE0K4VmV/3mkd2qfLQTGt2OcsryRNbGMXr9gUVZDtM9quD5JUQoENkz9YFwcOY9jI+i/X5J+Fcw6A==", + "requires": { + "apollo-graphql": "^0.3.4", + "apollo-server-env": "^2.4.3", + "core-js": "^3.4.0", + "lodash.xorby": "^4.7.0" + }, + "dependencies": { + "apollo-graphql": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/apollo-graphql/-/apollo-graphql-0.3.7.tgz", + "integrity": "sha512-ghW16xx9tRcyL38Pw6G5OidMnYn+CNUGZWmvqQgEO2nRy4T0ONPZZBOvGrIMtJQ70oEykNMKGm0zm6PdHdxd8Q==", + "requires": { + "apollo-env": "^0.6.1", + "lodash.sortby": "^4.7.0" + } + }, + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } + } + }, "@apollo/protobufjs": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@apollo/protobufjs/-/protobufjs-1.0.3.tgz", @@ -127,11 +154,54 @@ "apollo-env": "^0.6.1" } }, + "@apollographql/graphql-language-service-interface": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@apollographql/graphql-language-service-interface/-/graphql-language-service-interface-2.0.2.tgz", + "integrity": "sha512-28wePK0hlIVjgmvMXMAUq8qRSjz9O+6lqFp4PzOTHtfJfSsjVe9EfjF98zTpHsTgT3HcOxmbqDZZy8jlXtOqEA==", + "requires": { + "@apollographql/graphql-language-service-parser": "^2.0.0", + "@apollographql/graphql-language-service-types": "^2.0.0", + "@apollographql/graphql-language-service-utils": "^2.0.2" + } + }, + "@apollographql/graphql-language-service-parser": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@apollographql/graphql-language-service-parser/-/graphql-language-service-parser-2.0.2.tgz", + "integrity": "sha512-rpTPrEJu1PMaRQxz5P8BZWsixNNhYloS0H0dwTxNBuE3qctbARvR7o8UCKLsmKgTbo+cz3T3a6IAsWlkHgMWGg==", + "requires": { + "@apollographql/graphql-language-service-types": "^2.0.0" + } + }, + "@apollographql/graphql-language-service-types": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@apollographql/graphql-language-service-types/-/graphql-language-service-types-2.0.2.tgz", + "integrity": "sha512-vE+Dz8pG+Xa1Z2nMl82LoO66lQ6JqBUjaXqLDvS3eMjvA3N4hf+YUDOWfPdNZ0zjhHhHXzUIIZCkax6bXfFbzQ==" + }, + "@apollographql/graphql-language-service-utils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@apollographql/graphql-language-service-utils/-/graphql-language-service-utils-2.0.2.tgz", + "integrity": "sha512-fDj5rWlTi/czvUS5t7V7I45Ai6bOO3Z7JARYj21Y2xxfbRGtJi6h8FvLX0N/EbzQgo/fiZc/HAhtfwn+OCjD7A==", + "requires": { + "@apollographql/graphql-language-service-types": "^2.0.0" + } + }, "@apollographql/graphql-playground-html": { "version": "1.6.24", "resolved": "https://registry.npmjs.org/@apollographql/graphql-playground-html/-/graphql-playground-html-1.6.24.tgz", "integrity": "sha512-8GqG48m1XqyXh4mIZrtB5xOhUwSsh1WsrrsaZQOEYYql3YN9DEu9OOSg0ILzXHZo/h2Q74777YE4YzlArQzQEQ==" }, + "@ardatan/graphql-tools": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@ardatan/graphql-tools/-/graphql-tools-4.1.0.tgz", + "integrity": "sha512-0b+KH5RZN9vCMpEjxrwFwZ7v3K6QDjs1EH+R6eRrgKMR2X274JWqYraHKLWE1uJ8iwrkRaOYfCV12jLVuvWS+A==", + "requires": { + "apollo-link": "^1.2.3", + "apollo-utilities": "^1.0.1", + "deprecated-decorator": "^0.1.6", + "iterall": "^1.1.3", + "uuid": "^3.1.0" + } + }, "@babel/code-frame": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", @@ -1153,11 +1223,312 @@ "resolved": "https://registry.npmjs.org/@csstools/convert-colors/-/convert-colors-1.4.0.tgz", "integrity": "sha512-5a6wqoJV/xEdbRNKVo6I4hO3VjyDq//8q2f9I6PBAvMesJHFauXDorcNCsr9RzvsZnaWi5NYCcfyqP1QeFHFbw==" }, + "@endemolshinegroup/cosmiconfig-typescript-loader": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@endemolshinegroup/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-1.0.1.tgz", + "integrity": "sha512-bhUR9035PbgL6A/nfLayjoqKo4W7hCtzxqVxq2cgDB+Ndpsa3dGIr71/ymgY3vCTCQaufkFxAcEeoECyJ498CA==", + "requires": { + "lodash.get": "^4", + "make-error": "^1", + "ts-node": "^8", + "tslib": "^1" + } + }, + "@graphql-toolkit/apollo-engine-loader": { + "version": "0.9.6", + "resolved": "https://registry.npmjs.org/@graphql-toolkit/apollo-engine-loader/-/apollo-engine-loader-0.9.6.tgz", + "integrity": "sha512-gTj9mGBgKUL6jUk7jqdLAaf1qz3il8sd7/YlGuAOI8tos1igqjMJVRbCUbdlU8gFhObLSO9kKKRRvsVK+wmQ2A==", + "requires": { + "@graphql-toolkit/common": "0.9.6", + "apollo-language-server": "1.18.0", + "tslib": "1.10.0" + }, + "dependencies": { + "tslib": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" + } + } + }, + "@graphql-toolkit/code-file-loader": { + "version": "0.9.6", + "resolved": "https://registry.npmjs.org/@graphql-toolkit/code-file-loader/-/code-file-loader-0.9.6.tgz", + "integrity": "sha512-/5knaLbwJut8TENpGQKcNS4HxLqlwPhVpDeSI7ljixJ3Ke6lLPaCvu+aJKPe4OtR/e4eB2BK0X7tXV0FxHOW+g==", + "requires": { + "@graphql-toolkit/common": "0.9.6", + "@graphql-toolkit/graphql-tag-pluck": "0.9.6", + "tslib": "1.10.0" + }, + "dependencies": { + "tslib": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" + } + } + }, + "@graphql-toolkit/common": { + "version": "0.9.6", + "resolved": "https://registry.npmjs.org/@graphql-toolkit/common/-/common-0.9.6.tgz", + "integrity": "sha512-KnNo55Jrf80V17H0LoQeKeT1DTnVnsBvJv2NNQAYdcy5k11ELXuRQ3nJN9YjGhxsp5TOHiHIGh4CQcUlmlllVA==", + "requires": { + "@ardatan/graphql-tools": "4.1.0", + "aggregate-error": "3.0.1", + "lodash": "4.17.15" + } + }, + "@graphql-toolkit/core": { + "version": "0.9.6", + "resolved": "https://registry.npmjs.org/@graphql-toolkit/core/-/core-0.9.6.tgz", + "integrity": "sha512-kqqlqPUwcEpznv95tGrL+FmpvRq8HlTd9yZOpozifJf5aUcdyjTffVZwtqYX7/d+hAEr2I6Md3zZfOJG6onHuQ==", + "requires": { + "@graphql-toolkit/common": "0.9.6", + "@graphql-toolkit/schema-merging": "0.9.6", + "aggregate-error": "3.0.1", + "globby": "11.0.0", + "import-from": "^3.0.0", + "is-glob": "4.0.1", + "lodash": "4.17.15", + "resolve-from": "5.0.0", + "tslib": "1.10.0", + "unixify": "1.0.0", + "valid-url": "1.0.9" + }, + "dependencies": { + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==" + }, + "globby": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.0.tgz", + "integrity": "sha512-iuehFnR3xu5wBBtm4xi0dMe92Ob87ufyu/dHwpDYfbcpYpIbrO5OnS8M1vWvrBhSGEJ3/Ecj7gnX76P8YxpPEg==", + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + } + }, + "ignore": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", + "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==" + }, + "import-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-from/-/import-from-3.0.0.tgz", + "integrity": "sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ==", + "requires": { + "resolve-from": "^5.0.0" + } + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==" + }, + "tslib": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" + } + } + }, + "@graphql-toolkit/git-loader": { + "version": "0.9.6", + "resolved": "https://registry.npmjs.org/@graphql-toolkit/git-loader/-/git-loader-0.9.6.tgz", + "integrity": "sha512-eRdkoZq5hUpwz3ihr1wDMV8gHIQPupNeGsi3dygAG+60rH0ZK0ypNSHKkaO3OnFVPfjNAO7nIPw1+O7vD7IbsA==", + "requires": { + "@graphql-toolkit/common": "0.9.6", + "@graphql-toolkit/graphql-tag-pluck": "0.9.6", + "simple-git": "1.131.0" + } + }, + "@graphql-toolkit/github-loader": { + "version": "0.9.6", + "resolved": "https://registry.npmjs.org/@graphql-toolkit/github-loader/-/github-loader-0.9.6.tgz", + "integrity": "sha512-SKfhijp47SVQgzt1OK5B/xPrQwIcumr46wveeYrjVDqloXbukF40kluVS3rYGmlo9TKoNK0P4fYY/FanHtfZ0w==", + "requires": { + "@graphql-toolkit/common": "0.9.6", + "@graphql-toolkit/graphql-tag-pluck": "0.9.6", + "cross-fetch": "3.0.4" + } + }, + "@graphql-toolkit/graphql-file-loader": { + "version": "0.9.6", + "resolved": "https://registry.npmjs.org/@graphql-toolkit/graphql-file-loader/-/graphql-file-loader-0.9.6.tgz", + "integrity": "sha512-rxN+rIQX87nI20R6XHuNi4e/2/jSl9MrLQw0C5NUqcZLdy7FD89wbnnA1CPLVMEFMR/VyFRVUV0jk5ZCiTIQ1Q==", + "requires": { + "@graphql-toolkit/common": "0.9.6", + "tslib": "1.10.0" + }, + "dependencies": { + "tslib": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" + } + } + }, + "@graphql-toolkit/graphql-tag-pluck": { + "version": "0.9.6", + "resolved": "https://registry.npmjs.org/@graphql-toolkit/graphql-tag-pluck/-/graphql-tag-pluck-0.9.6.tgz", + "integrity": "sha512-d/+CX9n01p5LCU9u5fQjKop+etmtXYxXyxd/vczcgKq3hMjd0lGTfyQZPbXDJ7uLZWT6jMWhRHN5hy1yDYVs2w==", + "requires": { + "@babel/parser": "7.8.3", + "@babel/traverse": "7.8.3", + "@babel/types": "7.8.3", + "@graphql-toolkit/common": "0.9.6", + "vue-template-compiler": "^2.6.11" + }, + "dependencies": { + "@babel/parser": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.3.tgz", + "integrity": "sha512-/V72F4Yp/qmHaTALizEm9Gf2eQHV3QyTL3K0cNfijwnMnb1L+LDlAubb/ZnSdGAVzVSWakujHYs1I26x66sMeQ==" + }, + "@babel/traverse": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.3.tgz", + "integrity": "sha512-we+a2lti+eEImHmEXp7bM9cTxGzxPmBiVJlLVD+FuuQMeeO7RaDbutbgeheDkw+Xe3mCfJHnGOWLswT74m2IPg==", + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.8.3", + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/parser": "^7.8.3", + "@babel/types": "^7.8.3", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.13" + } + }, + "@babel/types": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", + "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + } + } + }, + "@graphql-toolkit/json-file-loader": { + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/@graphql-toolkit/json-file-loader/-/json-file-loader-0.9.5.tgz", + "integrity": "sha512-Zs6k7cf83qnFTS0txf/CmGros9OXvIhXxg4YfcrZmJzrRT5vbhTygdtLnmAYMnrZC8nsG6q1x31IIJ4zjBViHQ==", + "requires": { + "@graphql-toolkit/common": "0.9.5", + "tslib": "1.10.0" + }, + "dependencies": { + "@graphql-toolkit/common": { + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/@graphql-toolkit/common/-/common-0.9.5.tgz", + "integrity": "sha512-yot36v0ytePfHuG9o0R19VHxGykz3GlmzxWCMqbhvXMf/4N5exIw81iwBReB95fuEv0mu/EqmT29NEu50Ve/zg==", + "requires": { + "@ardatan/graphql-tools": "4.1.0", + "aggregate-error": "3.0.1", + "lodash": "4.17.15" + } + }, + "tslib": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" + } + } + }, + "@graphql-toolkit/prisma-loader": { + "version": "0.9.6", + "resolved": "https://registry.npmjs.org/@graphql-toolkit/prisma-loader/-/prisma-loader-0.9.6.tgz", + "integrity": "sha512-l/kSWlvtVJQzH6/KASnwneP9u8vu7jFz0Wuu2CO0sFjVCaKLMQDMvteyoLB0M0AmkJuEEOfXmcav+DNyRi4yvg==", + "requires": { + "@graphql-toolkit/common": "0.9.6", + "@graphql-toolkit/url-loader": "0.9.6", + "prisma-yml": "1.34.10", + "tslib": "1.10.0" + }, + "dependencies": { + "tslib": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" + } + } + }, + "@graphql-toolkit/schema-merging": { + "version": "0.9.6", + "resolved": "https://registry.npmjs.org/@graphql-toolkit/schema-merging/-/schema-merging-0.9.6.tgz", + "integrity": "sha512-uatZr9rAMbXqDl8HfTpjxH+g9UlC+NKhTlIeM21YnrpBwTo+16ahHAhAdT0500umXiI6K/wOqsnMeMfF1Va7gA==", + "requires": { + "@ardatan/graphql-tools": "4.1.0", + "@graphql-toolkit/common": "0.9.6", + "deepmerge": "4.2.2", + "tslib": "1.10.0" + }, + "dependencies": { + "tslib": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" + } + } + }, + "@graphql-toolkit/url-loader": { + "version": "0.9.6", + "resolved": "https://registry.npmjs.org/@graphql-toolkit/url-loader/-/url-loader-0.9.6.tgz", + "integrity": "sha512-jvwNARD4xe7tTkby80W2nGJ8J0itgOyZ0THG2evnSzYhXmrQhRVGuIA6jDwhnV0YI2a4uWK/hnbCVMAPorO6tw==", + "requires": { + "@ardatan/graphql-tools": "4.1.0", + "@graphql-toolkit/common": "0.9.6", + "cross-fetch": "3.0.4", + "tslib": "1.10.0", + "valid-url": "1.0.9" + }, + "dependencies": { + "tslib": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" + } + } + }, "@next/polyfill-nomodule": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/@next/polyfill-nomodule/-/polyfill-nomodule-9.2.2.tgz", "integrity": "sha512-J51QpynN0AxQ0saWkxgpr0JxWqSJFCBOOeQpbyn5hlgxjrcXR9dQ59tN677vbq2wJ8idLn898vZFaRmQsLq13A==" }, + "@nodelib/fs.scandir": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz", + "integrity": "sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==", + "requires": { + "@nodelib/fs.stat": "2.0.3", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz", + "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==" + }, + "@nodelib/fs.walk": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz", + "integrity": "sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==", + "requires": { + "@nodelib/fs.scandir": "2.1.3", + "fastq": "^1.6.0" + } + }, "@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -1653,6 +2024,30 @@ } } }, + "agent-base": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", + "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", + "requires": { + "es6-promisify": "^5.0.0" + } + }, + "aggregate-error": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz", + "integrity": "sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==", + "requires": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "dependencies": { + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==" + } + } + }, "ajv": { "version": "6.12.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", @@ -1870,6 +2265,63 @@ "lodash.sortby": "^4.7.0" } }, + "apollo-language-server": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/apollo-language-server/-/apollo-language-server-1.18.0.tgz", + "integrity": "sha512-4hWOaC7eVJnLgfssFQ+deLTssoHFL/bUnDBSf5UrxfouRpKExNjelWdsLgZulhKKUFdA4sEhhxR//opK95+9aQ==", + "requires": { + "@apollo/federation": "0.11.2", + "@apollographql/apollo-tools": "^0.4.3", + "@apollographql/graphql-language-service-interface": "^2.0.2", + "@endemolshinegroup/cosmiconfig-typescript-loader": "^1.0.0", + "apollo-datasource": "^0.6.0", + "apollo-env": "^0.6.1", + "apollo-graphql": "^0.3.7", + "apollo-link": "^1.2.3", + "apollo-link-context": "^1.0.9", + "apollo-link-error": "^1.1.1", + "apollo-link-http": "^1.5.5", + "apollo-server-errors": "^2.0.2", + "await-to-js": "^2.0.1", + "core-js": "^3.0.1", + "cosmiconfig": "^5.0.6", + "dotenv": "^8.0.0", + "glob": "^7.1.3", + "graphql": "14.0.2 - 14.2.0 || ^14.3.1", + "graphql-tag": "^2.10.1", + "lodash.debounce": "^4.0.8", + "lodash.merge": "^4.6.1", + "minimatch": "^3.0.4", + "moment": "^2.24.0", + "vscode-languageserver": "^5.1.0", + "vscode-uri": "1.0.6" + }, + "dependencies": { + "apollo-datasource": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/apollo-datasource/-/apollo-datasource-0.6.4.tgz", + "integrity": "sha512-u4eu6Q94q6KuZacZfdo4vCevA81F4QWeTYEXUvoksQMJpiacPHHe0DJrofKVKvxngUp5kCi1RnPXSc6kBY+/oA==", + "requires": { + "apollo-server-caching": "^0.5.1", + "apollo-server-env": "^2.4.3" + } + }, + "apollo-graphql": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/apollo-graphql/-/apollo-graphql-0.3.7.tgz", + "integrity": "sha512-ghW16xx9tRcyL38Pw6G5OidMnYn+CNUGZWmvqQgEO2nRy4T0ONPZZBOvGrIMtJQ70oEykNMKGm0zm6PdHdxd8Q==", + "requires": { + "apollo-env": "^0.6.1", + "lodash.sortby": "^4.7.0" + } + }, + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } + } + }, "apollo-link": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/apollo-link/-/apollo-link-1.2.13.tgz", @@ -1881,6 +2333,15 @@ "zen-observable-ts": "^0.8.20" } }, + "apollo-link-context": { + "version": "1.0.19", + "resolved": "https://registry.npmjs.org/apollo-link-context/-/apollo-link-context-1.0.19.tgz", + "integrity": "sha512-TUi5TyufU84hEiGkpt+5gdH5HkB3Gx46npNfoxR4of3DKBCMuItGERt36RCaryGcU/C3u2zsICU3tJ+Z9LjFoQ==", + "requires": { + "apollo-link": "^1.2.13", + "tslib": "^1.9.3" + } + }, "apollo-link-error": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/apollo-link-error/-/apollo-link-error-1.1.12.tgz", @@ -2309,6 +2770,11 @@ } } }, + "await-to-js": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/await-to-js/-/await-to-js-2.1.1.tgz", + "integrity": "sha512-CHBC6gQGCIzjZ09tJ+XmpQoZOn4GdWePB4qUweCaKNJ0D3f115YdhmYVTZ4rMVpiJ3cFzZcTYK1VMYEICV4YXw==" + }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -3051,6 +3517,11 @@ } } }, + "clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==" + }, "cli-cursor": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", @@ -3096,6 +3567,11 @@ "shallow-clone": "^0.1.2" } }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, "coa": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/coa/-/coa-2.0.2.tgz", @@ -4191,6 +4667,12 @@ "assert-plus": "^1.0.0" } }, + "de-indent": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz", + "integrity": "sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0=", + "optional": true + }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", @@ -4215,6 +4697,11 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==" + }, "defaults": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", @@ -4333,6 +4820,11 @@ "streamsearch": "0.1.2" } }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" + }, "diffie-hellman": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", @@ -4343,6 +4835,21 @@ "randombytes": "^2.0.0" } }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "requires": { + "path-type": "^4.0.0" + }, + "dependencies": { + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" + } + } + }, "doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -4397,6 +4904,11 @@ "is-obj": "^2.0.0" } }, + "dotenv": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", + "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==" + }, "duplexer": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", @@ -4470,6 +4982,14 @@ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" }, + "encoding": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", + "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", + "requires": { + "iconv-lite": "~0.4.13" + } + }, "end-of-stream": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", @@ -4573,6 +5093,19 @@ "es6-symbol": "^3.1.1" } }, + "es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" + }, + "es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", + "requires": { + "es6-promise": "^4.0.3" + } + }, "es6-symbol": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", @@ -5724,6 +6257,30 @@ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==" }, + "fast-glob": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.2.tgz", + "integrity": "sha512-UDV82o4uQyljznxwMxyVRJgZZt3O5wENYojjzbaGEGZgeOxkLFf+V4cnUD+krzb2F72E18RhamkMZ7AdeggF7A==", + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.0", + "merge2": "^1.3.0", + "micromatch": "^4.0.2", + "picomatch": "^2.2.1" + }, + "dependencies": { + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + } + } + }, "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -5740,6 +6297,14 @@ "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz", "integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==" }, + "fastq": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.6.1.tgz", + "integrity": "sha512-mpIH5sKYueh3YyeJwqtVo8sORi0CgtmkVbK6kZStpQlZBYQuTzG2CZ7idSiJuA7bY0SFCWUc5WIs+oYumGCQNw==", + "requires": { + "reusify": "^1.0.4" + } + }, "figgy-pudding": { "version": "3.5.1", "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz", @@ -5978,6 +6543,16 @@ "resolved": "https://registry.npmjs.org/fs-capacitor/-/fs-capacitor-2.0.4.tgz", "integrity": "sha512-8S4f4WsCryNw2mJJchi46YgB6CR5Ze+4L1h8ewl9tEpL4SJ3ZO+c/bS4BWhB8bK+O3TMqhuZarTitd0S0eh2pA==" }, + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, "fs-write-stream-atomic": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", @@ -6156,6 +6731,51 @@ "apollo-server-types": "^0.2.10" } }, + "graphql-import": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/graphql-import/-/graphql-import-1.0.0-beta.2.tgz", + "integrity": "sha512-4bSKFIKyceuDohoMtKfNbce98hvSOt0fIxLRO9sMt97UC1i1kz+w+U0HjMyvPIa45zNYH4ToKK1p3FhSlkvaJw==", + "requires": { + "@graphql-toolkit/apollo-engine-loader": "0.9.6", + "@graphql-toolkit/code-file-loader": "0.9.6", + "@graphql-toolkit/core": "0.9.6", + "@graphql-toolkit/git-loader": "0.9.6", + "@graphql-toolkit/github-loader": "0.9.6", + "@graphql-toolkit/graphql-file-loader": "0.9.6", + "@graphql-toolkit/json-file-loader": "0.9.5", + "@graphql-toolkit/prisma-loader": "0.9.6", + "@graphql-toolkit/url-loader": "0.9.6" + } + }, + "graphql-request": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/graphql-request/-/graphql-request-1.8.2.tgz", + "integrity": "sha512-dDX2M+VMsxXFCmUX0Vo0TopIZIX4ggzOtiCsThgtrKR4niiaagsGTDIHj3fsOMFETpa064vzovI+4YV4QnMbcg==", + "requires": { + "cross-fetch": "2.2.2" + }, + "dependencies": { + "cross-fetch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-2.2.2.tgz", + "integrity": "sha1-pH/09/xxLauo9qaVoRyUhEDUVyM=", + "requires": { + "node-fetch": "2.1.2", + "whatwg-fetch": "2.0.4" + } + }, + "node-fetch": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.1.2.tgz", + "integrity": "sha1-q4hOjn5X44qUR1POxwb3iNF2i7U=" + }, + "whatwg-fetch": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", + "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==" + } + } + }, "graphql-tag": { "version": "2.10.3", "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.10.3.tgz", @@ -6324,6 +6944,12 @@ "minimalistic-assert": "^1.0.1" } }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "optional": true + }, "hex-color-regex": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/hex-color-regex/-/hex-color-regex-1.1.0.tgz", @@ -6409,6 +7035,30 @@ "requires-port": "^1.0.0" } }, + "http-proxy-agent": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", + "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==", + "requires": { + "agent-base": "4", + "debug": "3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -6424,6 +7074,25 @@ "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" }, + "https-proxy-agent": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", + "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", + "requires": { + "agent-base": "^4.3.0", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + } + } + }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -6941,6 +7610,35 @@ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" }, + "isomorphic-fetch": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", + "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", + "requires": { + "node-fetch": "^1.0.1", + "whatwg-fetch": ">=0.10.0" + }, + "dependencies": { + "node-fetch": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", + "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "requires": { + "encoding": "^0.1.11", + "is-stream": "^1.0.1" + } + } + } + }, + "isomorphic-unfetch": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-unfetch/-/isomorphic-unfetch-3.0.0.tgz", + "integrity": "sha512-V0tmJSYfkKokZ5mgl0cmfQMTb7MLHsBMngTkbLY0eXvKqiVRRoZP04Ly+KhKrJfKtzC9E6Pp15Jo+bwh7Vi2XQ==", + "requires": { + "node-fetch": "^2.2.0", + "unfetch": "^4.0.0" + } + }, "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", @@ -7024,6 +7722,14 @@ "resolved": "https://registry.npmjs.org/json-schema-typed/-/json-schema-typed-7.0.3.tgz", "integrity": "sha512-7DE8mpG+/fVw+dTpjbxnx47TaMnDfOI1jwft9g1VybltZCduyRQPJPvc+zzKY9WPHxhPWczyFuYa6I8Mw4iU5A==" }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "requires": { + "jsonify": "~0.0.0" + } + }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", @@ -7043,6 +7749,19 @@ "minimist": "^1.2.0" } }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" + }, "jsonwebtoken": { "version": "8.5.1", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", @@ -7247,6 +7966,16 @@ "resolved": "https://registry.npmjs.org/lodash.curry/-/lodash.curry-4.1.1.tgz", "integrity": "sha1-JI42By7ekGUB11lmIAqG2riyMXA=" }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=" + }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=" + }, "lodash.includes": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", @@ -7282,6 +8011,11 @@ "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=" }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" + }, "lodash.once": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", @@ -7319,6 +8053,11 @@ "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=" }, + "lodash.xorby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.xorby/-/lodash.xorby-4.7.0.tgz", + "integrity": "sha1-nBmm+fBjputT3QPBtocXmYAUY9c=" + }, "log-symbols": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", @@ -7393,6 +8132,11 @@ "pify": "^3.0.0" } }, + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" + }, "mamacro": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/mamacro/-/mamacro-0.0.3.tgz", @@ -7462,6 +8206,11 @@ "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" }, + "merge2": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.3.0.tgz", + "integrity": "sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw==" + }, "micro": { "version": "9.3.4", "resolved": "https://registry.npmjs.org/micro/-/micro-9.3.4.tgz", @@ -7756,6 +8505,11 @@ } } }, + "moment": { + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz", + "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==" + }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -12553,6 +13307,98 @@ "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" }, + "prisma-json-schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/prisma-json-schema/-/prisma-json-schema-0.1.3.tgz", + "integrity": "sha512-XZrf2080oR81mY8/OC8al68HiwBm0nXlFE727JIia0ZbNqwuV4MyRYk6E0+OIa6/9KEYxZrcAmoBs3EW1cCvnA==" + }, + "prisma-yml": { + "version": "1.34.10", + "resolved": "https://registry.npmjs.org/prisma-yml/-/prisma-yml-1.34.10.tgz", + "integrity": "sha512-N9on+Cf/XQKFGUULk/681tnpfqiZ19UBTurFMm+/9rnml37mteDaFr2k8yz+K8Gt2xpEJ7kBu7ikG5PrXI1uoA==", + "requires": { + "ajv": "5", + "bluebird": "^3.5.1", + "chalk": "^2.3.0", + "debug": "^3.1.0", + "dotenv": "^4.0.0", + "fs-extra": "^7.0.0", + "graphql-request": "^1.5.0", + "http-proxy-agent": "^2.1.0", + "https-proxy-agent": "^2.2.1", + "isomorphic-fetch": "^2.2.1", + "js-yaml": "^3.10.0", + "json-stable-stringify": "^1.0.1", + "jsonwebtoken": "^8.1.0", + "lodash": "^4.17.4", + "prisma-json-schema": "0.1.3", + "replaceall": "^0.1.6", + "scuid": "^1.0.2", + "yaml-ast-parser": "^0.0.40" + }, + "dependencies": { + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "dotenv": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-4.0.0.tgz", + "integrity": "sha1-hk7xN5rO1Vzm+V3r7NzhefegzR0=" + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=" + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, "private": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", @@ -13010,6 +13856,11 @@ "is-finite": "^1.0.0" } }, + "replaceall": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/replaceall/-/replaceall-0.1.6.tgz", + "integrity": "sha1-gdgax663LX9cSUKt8ml6MiBojY4=" + }, "request": { "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", @@ -13169,6 +14020,11 @@ "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=" }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==" + }, "rework": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/rework/-/rework-1.0.1.tgz", @@ -13226,6 +14082,11 @@ "is-promise": "^2.1.0" } }, + "run-parallel": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz", + "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==" + }, "run-queue": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", @@ -13327,6 +14188,11 @@ } } }, + "scuid": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/scuid/-/scuid-1.1.0.tgz", + "integrity": "sha512-MuCAyrGZcTLfQoH2XoBlQ8C6bzwN88XT/0slOGz0pn8+gIP85BOAfYa44ZXQUTOwRwPU0QvgU+V+OSajl/59Xg==" + }, "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", @@ -13480,6 +14346,14 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" }, + "simple-git": { + "version": "1.131.0", + "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-1.131.0.tgz", + "integrity": "sha512-z/art7YYtmPnnLItT/j+nKwJt6ap6nHZ4D8sYo9PdCKK/ug56SN6m/evfxJk7uDV3e9JuCa8qIyDU2P3cxmiNQ==", + "requires": { + "debug": "^4.0.1" + } + }, "simple-swizzle": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", @@ -13495,6 +14369,11 @@ } } }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" + }, "slice-ansi": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", @@ -14426,6 +15305,18 @@ "tslib": "^1.9.3" } }, + "ts-node": { + "version": "8.6.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.6.2.tgz", + "integrity": "sha512-4mZEbofxGqLL2RImpe3zMJukvEvcO1XP8bj8ozBPySdCUXEcU5cIRwR0aM3R+VoZq7iXc8N86NC0FspGRqP4gg==", + "requires": { + "arg": "^4.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "source-map-support": "^0.5.6", + "yn": "3.1.1" + } + }, "ts-pnp": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/ts-pnp/-/ts-pnp-1.1.6.tgz", @@ -14553,6 +15444,29 @@ "imurmurhash": "^0.1.4" } }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + }, + "unixify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unixify/-/unixify-1.0.0.tgz", + "integrity": "sha1-OmQcjC/7zk2mg6XHDwOkYpQMIJA=", + "requires": { + "normalize-path": "^2.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", @@ -14690,6 +15604,11 @@ "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", "dev": true }, + "valid-url": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/valid-url/-/valid-url-1.0.9.tgz", + "integrity": "sha1-HBRHm0DxOXp1eC8RXkCGRHQzogA=" + }, "validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -14724,6 +15643,49 @@ "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==" }, + "vscode-jsonrpc": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-4.0.0.tgz", + "integrity": "sha512-perEnXQdQOJMTDFNv+UF3h1Y0z4iSiaN9jIlb0OqIYgosPCZGYh/MCUlkFtV2668PL69lRDO32hmvL2yiidUYg==" + }, + "vscode-languageserver": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-5.2.1.tgz", + "integrity": "sha512-GuayqdKZqAwwaCUjDvMTAVRPJOp/SLON3mJ07eGsx/Iq9HjRymhKWztX41rISqDKhHVVyFM+IywICyZDla6U3A==", + "requires": { + "vscode-languageserver-protocol": "3.14.1", + "vscode-uri": "^1.0.6" + } + }, + "vscode-languageserver-protocol": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.14.1.tgz", + "integrity": "sha512-IL66BLb2g20uIKog5Y2dQ0IiigW0XKrvmWiOvc0yXw80z3tMEzEnHjaGAb3ENuU7MnQqgnYJ1Cl2l9RvNgDi4g==", + "requires": { + "vscode-jsonrpc": "^4.0.0", + "vscode-languageserver-types": "3.14.0" + } + }, + "vscode-languageserver-types": { + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.14.0.tgz", + "integrity": "sha512-lTmS6AlAlMHOvPQemVwo3CezxBp0sNB95KNPkqp3Nxd5VFEnuG1ByM0zlRWos0zjO3ZWtkvhal0COgiV1xIA4A==" + }, + "vscode-uri": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-1.0.6.tgz", + "integrity": "sha512-sLI2L0uGov3wKVb9EB+vIQBl9tVP90nqRvxSoJ35vI3NjxE8jfsE5DSOhWgSunHSZmKS4OCi2jrtfxK7uyp2ww==" + }, + "vue-template-compiler": { + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.6.11.tgz", + "integrity": "sha512-KIq15bvQDrcCjpGjrAhx4mUlyyHfdmTaoNfeoATHLAiWB+MU3cx4lOzMwrnUh9cCxy0Lt1T11hAFY6TQgroUAA==", + "optional": true, + "requires": { + "de-indent": "^1.0.2", + "he": "^1.1.0" + } + }, "watchpack": { "version": "2.0.0-beta.5", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.0.0-beta.5.tgz", @@ -15567,6 +16529,11 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" }, + "yaml-ast-parser": { + "version": "0.0.40", + "resolved": "https://registry.npmjs.org/yaml-ast-parser/-/yaml-ast-parser-0.0.40.tgz", + "integrity": "sha1-CFNtTnPTIrHJziB6uN1w4E0grm4=" + }, "yargs": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", @@ -15614,6 +16581,11 @@ } } }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==" + }, "zen-observable": { "version": "0.8.15", "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.15.tgz", diff --git a/package.json b/package.json index c694a20..9c4b2fd 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,10 @@ "apollo-boost": "^0.4.7", "apollo-link-schema": "^1.2.4", "apollo-server-micro": "^2.10.1", + "graphql-import": "^1.0.0-beta.2", "graphql-tag": "^2.10.3", "graphql-tools": "^4.0.7", + "isomorphic-unfetch": "^3.0.0", "next": "9.2.2", "node-sass": "^4.13.1", "optimize-css-assets-webpack-plugin": "^5.0.3", @@ -32,5 +34,5 @@ "eslint-plugin-promise": "^4.2.1", "eslint-plugin-react": "^7.18.3", "eslint-plugin-standard": "^4.0.1" - } + } } diff --git a/pages/api/graphql.js b/pages/api/graphql.js deleted file mode 100644 index c1759bc..0000000 --- a/pages/api/graphql.js +++ /dev/null @@ -1,7 +0,0 @@ -import { ApolloServer } from 'apollo-server-micro' -import { schema } from '../../graphql' - -const apolloServer = new ApolloServer({ schema }) - -export const config = { api: { bodyParser: false } } -export default apolloServer.createHandler({ path: '/api/graphql' }) diff --git a/pages/articles.js b/pages/articles.js index 5560b3d..5f7419b 100644 --- a/pages/articles.js +++ b/pages/articles.js @@ -31,4 +31,4 @@ const Articles = () => { ) } -export default withApollo(Articles) +export default withApollo({ ssr: true })(Articles)