This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react" | |
import { useMutation, useQuery } from "@apollo/react-hooks"; | |
import gql from "graphql-tag"; | |
const toggleAppTheme = gql` | |
mutation updateAppState{ | |
isDarkModeEnabled | |
} | |
`; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react" | |
import { useMutation } from "@apollo/react-hooks"; | |
import gql from "graphql-tag"; | |
const TOGGLE_THEME = gql` | |
mutation updateAppState @client { | |
isDarkModeEnabled | |
} | |
`; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gql from 'graphql-tag'; | |
const getAppState = gql` | |
query { | |
state @client { | |
appState { | |
isDarkModeEnabled | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gql from 'graphql-tag'; | |
const typeDefs = gql ` | |
type appState { | |
isDarkModeEnabled: Boolean | |
} | |
`; | |
export default typeDefs; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gql from 'graphql-tag'; | |
const typeDefs = gql ` | |
extend type appState { | |
isDarkModeEnabled: Boolean | |
} | |
`; | |
export default typeDefs; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { InMemoryCache, NormalizedCacheObject } from 'apollo-cache-inmemory'; | |
import { ApolloClient } from 'apollo-client'; | |
import { HttpLink } from 'apollo-link-http'; | |
// typedefs and resolvers | |
import StateResolvers from './resolvers'; | |
import typeDefs from './typeDefs'; | |
export function createClient(): ApolloClient<NormalizedCacheObject> { | |
const cache = new InMemoryCache(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { InMemoryCache, NormalizedCacheObject } from 'apollo-cache-inmemory'; | |
import { ApolloClient } from 'apollo-client'; | |
import { HttpLink } from 'apollo-link-http'; | |
// typedefs and resolvers | |
import StateResolvers from './resolvers'; | |
import typeDefs from './state'; | |
export function createClient(): ApolloClient<NormalizedCacheObject> { | |
const cache = new InMemoryCache(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { InMemoryCache, NormalizedCacheObject } from 'apollo-cache-inmemory'; | |
import { ApolloClient } from 'apollo-client'; | |
import { HttpLink } from 'apollo-link-http'; | |
// typedefs and resolvers | |
import StateResolvers from 'app/shared/graphql/state/resolvers'; | |
import typeDefs from './state'; | |
export function createClient(): ApolloClient<NormalizedCacheObject> { | |
const cache = new InMemoryCache(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { InMemoryCache, NormalizedCacheObject } from 'apollo-cache-inmemory'; | |
import { ApolloClient } from 'apollo-client'; | |
import { HttpLink } from 'apollo-link-http'; | |
import fetch from 'node-fetch'; | |
// typedefs and resolvers | |
import StateResolvers from 'app/shared/graphql/state/resolvers'; | |
import typeDefs from './state'; | |
export function createClient(): ApolloClient<NormalizedCacheObject> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { InMemoryCache, NormalizedCacheObject } from 'apollo-cache-inmemory'; | |
import { ApolloClient } from 'apollo-client'; | |
import { HttpLink } from 'apollo-link-http'; | |
import fetch from 'node-fetch'; | |
// typedefs and resolvers | |
import StateResolvers from 'app/shared/graphql/state/resolvers'; | |
import typeDefs from './state'; | |
export function createClient(): ApolloClient<NormalizedCacheObject> { |
NewerOlder