Import gql from @apollo/client instead of graphql-tag.

This commit is contained in:
Jayden Seric 2020-09-12 14:09:54 +10:00
parent 09f6834d30
commit 06212b1798
6 changed files with 5 additions and 16 deletions

View File

@ -1,12 +1,6 @@
{ {
"extends": ["env"], "extends": ["env"],
"rules": { "rules": {
"react/prop-types": "off", "react/prop-types": "off"
"node/no-unpublished-import": [
"error",
{
"allowModules": ["graphql-tag"]
}
]
} }
} }

View File

@ -1,6 +1,5 @@
import { useApolloClient, useMutation } from '@apollo/client'; import { gql, useApolloClient, useMutation } from '@apollo/client';
import { ButtonSubmit, Code, Fieldset, Textbox } from 'device-agnostic-ui'; import { ButtonSubmit, Code, Fieldset, Textbox } from 'device-agnostic-ui';
import gql from 'graphql-tag';
import React from 'react'; import React from 'react';
const SINGLE_UPLOAD_MUTATION = gql` const SINGLE_UPLOAD_MUTATION = gql`

View File

@ -1,5 +1,4 @@
import { useApolloClient, useMutation } from '@apollo/client'; import { gql, useApolloClient, useMutation } from '@apollo/client';
import gql from 'graphql-tag';
const SINGLE_UPLOAD_MUTATION = gql` const SINGLE_UPLOAD_MUTATION = gql`
mutation singleUpload($file: Upload!) { mutation singleUpload($file: Upload!) {

View File

@ -1,5 +1,4 @@
import { useApolloClient, useMutation } from '@apollo/client'; import { gql, useApolloClient, useMutation } from '@apollo/client';
import gql from 'graphql-tag';
const MULTIPLE_UPLOAD_MUTATION = gql` const MULTIPLE_UPLOAD_MUTATION = gql`
mutation multipleUpload($files: [Upload!]!) { mutation multipleUpload($files: [Upload!]!) {

View File

@ -1,6 +1,5 @@
import { useQuery } from '@apollo/client'; import { gql, useQuery } from '@apollo/client';
import { Scroll, Table } from 'device-agnostic-ui'; import { Scroll, Table } from 'device-agnostic-ui';
import gql from 'graphql-tag';
const UPLOADS_QUERY = gql` const UPLOADS_QUERY = gql`
query uploads { query uploads {

View File

@ -32,7 +32,6 @@
"eslint-plugin-prettier": "^3.1.4", "eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.20.6", "eslint-plugin-react": "^7.20.6",
"eslint-plugin-react-hooks": "^4.1.1", "eslint-plugin-react-hooks": "^4.1.1",
"graphql-tag": "^2.11.0",
"prettier": "^2.1.1" "prettier": "^2.1.1"
}, },
"scripts": { "scripts": {