Skip to content

closes #108: cache crash #113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 1, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
avoid using cache
  • Loading branch information
ShMcK committed Mar 1, 2020
commit 75bb9d83c742cb0c3ed04a4080dae74eafd6cf6f
4 changes: 3 additions & 1 deletion web-app/src/containers/New/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ interface TutorialsData {
}

const NewPageContainer = (props: ContainerProps) => {
const { data, loading, error } = useQuery<TutorialsData>(queryTutorials)
const { data, loading, error } = useQuery<TutorialsData>(queryTutorials, {
fetchPolicy: 'network-only',
})

if (error) {
return <ErrorView error={error} />
Expand Down
5 changes: 1 addition & 4 deletions web-app/src/services/apollo/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import ApolloClient, { InMemoryCache } from 'apollo-boost'
import ApolloClient from 'apollo-boost'
import { GQL_URI } from '../../environment'
import { authorizeHeaders } from './auth'

export const cache = new InMemoryCache()

const client = new ApolloClient({
uri: GQL_URI,
request: authorizeHeaders,
cache,
})

export default client
3 changes: 3 additions & 0 deletions web-app/src/services/state/actions/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ const contextActions: ActionFunctionMap<T.MachineContext, T.MachineEvent> = {
const position: T.Position = selectors.defaultPosition()
return position
},
processes() {
return []
},
}),
// @ts-ignore
setError: assign({
Expand Down