sdy

change apollo-boost to graphql-tag

import React from "react";
import { gql } from "apollo-boost";
import gql from "graphql-tag";
import { useQuery } from "@apollo/react-hooks";
import { ThemeProvider } from "styled-components";
import GlobalStyles from "../Styles/GlobalStyles";
......@@ -15,9 +15,12 @@ const QUERY = gql`
`;
export default () => {
const {
data: { isLoggedIn },
} = useQuery(QUERY);
const { data } = useQuery(QUERY);
let isLoggedIn;
if (data !== undefined) {
isLoggedIn = data.isLoggedIn;
}
return (
<ThemeProvider theme={Theme}>
......
import { gql } from "apollo-boost";
import gql from "graphql-tag";
export const LOG_IN = gql`
mutation login($email: String!, $password: String!) {
......
import { gql } from "apollo-boost";
import gql from "graphql-tag";
export const GET_CATEGORIRES = gql`
{
......
import { gql } from "apollo-boost";
import gql from "graphql-tag";
export const SUBSCRIPTION_MSG = gql`
subscription {
......
import React from "react";
import { useMutation } from "@apollo/react-hooks";
import { gql } from "apollo-boost";
import gql from "graphql-tag";
import MenuPresenter from "./MenuPresenter";
const LOG_OUT = gql`
......
import { gql } from "apollo-boost";
import gql from "graphql-tag";
export const GET_ROOMS = gql`
{
......