feat: Introduce adding a new app connection
This commit is contained in:
11
packages/web/src/graphql/cache.ts
Normal file
11
packages/web/src/graphql/cache.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { InMemoryCache } from '@apollo/client';
|
||||
|
||||
const cache = new InMemoryCache({
|
||||
typePolicies: {
|
||||
App: {
|
||||
keyFields: ['key']
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
export default cache;
|
@@ -1,7 +1,7 @@
|
||||
import { ApolloClient, InMemoryCache } from '@apollo/client';
|
||||
import { ApolloClient } from '@apollo/client';
|
||||
import cache from './cache';
|
||||
import appConfig from 'config/app';
|
||||
|
||||
const cache = new InMemoryCache();
|
||||
const client = new ApolloClient({
|
||||
uri: appConfig.graphqlUrl,
|
||||
cache
|
||||
|
@@ -3,6 +3,7 @@ import { gql } from '@apollo/client';
|
||||
export const GET_APPS = gql`
|
||||
query GetApps($name: String) {
|
||||
getApps(name: $name) {
|
||||
key
|
||||
name
|
||||
iconUrl
|
||||
docUrl
|
||||
|
Reference in New Issue
Block a user