Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit89beeb8

Browse files
authored
Merge pull request#113 from ShMcK/fix/completion-crash
closes#108: cache crash
2 parents4a736d8 +543a51c commit89beeb8

File tree

6 files changed

+10
-7
lines changed

6 files changed

+10
-7
lines changed

‎web-app/src/containers/New/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ interface TutorialsData {
1717
}
1818

1919
constNewPageContainer=(props:ContainerProps)=>{
20-
const{ data, loading, error}=useQuery<TutorialsData>(queryTutorials)
20+
const{ data, loading, error}=useQuery<TutorialsData>(queryTutorials,{
21+
fetchPolicy:'no-cache',
22+
})
2123

2224
if(error){
2325
return<ErrorViewerror={error}/>

‎web-app/src/containers/Overview/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const Overview = (props: PageProps) => {
2828
thrownewError('Tutorial not found in summary page')
2929
}
3030
const{ loading, error, data}=useQuery<TutorialData,TutorialDataVariables>(queryTutorial,{
31-
fetchPolicy:'network-only',// to ensure latest
31+
fetchPolicy:'no-cache',// to ensure latest
3232
variables:{
3333
tutorialId:tutorial.id,
3434
// version: tutorial.version.version, // TODO: re-enable latest

‎web-app/src/services/apollo/index.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
importApolloClient,{InMemoryCache}from'apollo-boost'
1+
importApolloClientfrom'apollo-boost'
22
import{GQL_URI}from'../../environment'
33
import{authorizeHeaders}from'./auth'
44

5-
exportconstcache=newInMemoryCache()
6-
75
constclient=newApolloClient({
86
uri:GQL_URI,
97
request:authorizeHeaders,
10-
cache,
118
})
129

1310
exportdefaultclient

‎web-app/src/services/apollo/queries/tutorials.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export default gql`
1414
description
1515
}
1616
version {
17+
id
1718
publishedAt
1819
publishedBy {
1920
id

‎web-app/src/services/state/actions/context.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@ const contextActions: ActionFunctionMap<T.MachineContext, T.MachineEvent> = {
211211
constposition:T.Position=selectors.defaultPosition()
212212
returnposition
213213
},
214+
processes(){
215+
return[]
216+
},
214217
}),
215218
//@ts-ignore
216219
setError:assign({

‎web-app/src/services/state/machine.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ export const createMachine = (options: any) => {
239239
},
240240
Completed:{
241241
id:'completed-tutorial',
242-
onEntry:['userTutorialComplete'],
242+
onEntry:['userTutorialComplete'],// unusued
243243
on:{
244244
SELECT_TUTORIAL:{
245245
target:'#select-new-tutorial',

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp