From 9c199e0dc7698ab03baae9bb3e34d88facd0e95e Mon Sep 17 00:00:00 2001 From: Jayden Seric Date: Mon, 20 Jul 2020 14:53:28 +1000 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20import=20gql=20from=20@apollo/c?= =?UTF-8?q?lient.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/gajus/babel-plugin-graphql-tag/issues/41 . --- app/.eslintrc.json | 8 +++++++- app/components/UploadBlob.js | 3 ++- app/components/UploadFile.js | 3 ++- app/components/UploadFileList.js | 3 ++- app/components/Uploads.js | 3 ++- app/package.json | 1 + 6 files changed, 16 insertions(+), 5 deletions(-) diff --git a/app/.eslintrc.json b/app/.eslintrc.json index 216de14..a0cec9a 100644 --- a/app/.eslintrc.json +++ b/app/.eslintrc.json @@ -1,6 +1,12 @@ { "extends": ["env"], "rules": { - "react/prop-types": "off" + "react/prop-types": "off", + "node/no-unpublished-import": [ + "error", + { + "allowModules": ["graphql-tag"] + } + ] } } diff --git a/app/components/UploadBlob.js b/app/components/UploadBlob.js index 1ce46f4..031fd95 100644 --- a/app/components/UploadBlob.js +++ b/app/components/UploadBlob.js @@ -1,5 +1,6 @@ -import { gql, useApolloClient, useMutation } from '@apollo/client'; +import { useApolloClient, useMutation } from '@apollo/client'; import { ButtonSubmit, Code, Fieldset, Textbox } from 'device-agnostic-ui'; +import gql from 'graphql-tag'; import React from 'react'; const SINGLE_UPLOAD_MUTATION = gql` diff --git a/app/components/UploadFile.js b/app/components/UploadFile.js index bcbaa0d..285e39c 100644 --- a/app/components/UploadFile.js +++ b/app/components/UploadFile.js @@ -1,4 +1,5 @@ -import { gql, useApolloClient, useMutation } from '@apollo/client'; +import { useApolloClient, useMutation } from '@apollo/client'; +import gql from 'graphql-tag'; const SINGLE_UPLOAD_MUTATION = gql` mutation singleUpload($file: Upload!) { diff --git a/app/components/UploadFileList.js b/app/components/UploadFileList.js index 4c4364c..d36d86d 100644 --- a/app/components/UploadFileList.js +++ b/app/components/UploadFileList.js @@ -1,4 +1,5 @@ -import { gql, useApolloClient, useMutation } from '@apollo/client'; +import { useApolloClient, useMutation } from '@apollo/client'; +import gql from 'graphql-tag'; const MULTIPLE_UPLOAD_MUTATION = gql` mutation multipleUpload($files: [Upload!]!) { diff --git a/app/components/Uploads.js b/app/components/Uploads.js index 7617ad8..56141d3 100644 --- a/app/components/Uploads.js +++ b/app/components/Uploads.js @@ -1,5 +1,6 @@ -import { gql, useQuery } from '@apollo/client'; +import { useQuery } from '@apollo/client'; import { Scroll, Table } from 'device-agnostic-ui'; +import gql from 'graphql-tag'; const UPLOADS_QUERY = gql` query uploads { diff --git a/app/package.json b/app/package.json index 008bbfc..1ad21f2 100644 --- a/app/package.json +++ b/app/package.json @@ -32,6 +32,7 @@ "eslint-plugin-prettier": "^3.1.4", "eslint-plugin-react": "^7.20.3", "eslint-plugin-react-hooks": "^4.0.8", + "graphql-tag": "^2.10.4", "prettier": "^2.0.5" }, "scripts": {