Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{isEditing && (
)}
);*/
};
export default createFragmentContainer(Todo, {
todo: graphql`
fragment Todo_todo on Todo {
complete
id
text
}
`,
user: graphql`
fragment Todo_user on User {
id
userId
totalCount
completedCount
}
`,
});
onChange={handleMarkAllChange}
type="checkbox"
/>
<label>Mark all as complete</label>
<ul>
{nodes.map((node: Node) => (
))}
</ul>
);*/
};
export default createFragmentContainer(TodoList, {
user: graphql`
fragment TodoList_user on User {
todos(
first: 2147483647 # max GraphQLInt
) @connection(key: "TodoList_todos") {
edges {
node {
id
complete
...Todo_todo
}
}
}
id
userId
totalCount
return (
);
};
export default createFragmentContainer(TodoApp, {
user: graphql`
fragment TodoApp_user on User {
id
userId
totalCount
completedCount
...TodoList_user
...TodoListFooter_user
}
`,
});
/*
...TodoListFooter_user
*/
Retry
<button>
Purge
</button>
<footer>
<p>Double-click to edit a todo</p>
</footer>
);
};
export default createFragmentContainer(TodoApp, {
user: graphql`
fragment TodoApp_user on User {
id
userId
totalCount
completedCount
...TodoListFooter_user
...TodoList_user
}
`,
});
const hasTodos = user.totalCount > 0;
return (
Todos
{hasTodos && }
);
};
export default createFragmentContainer(TodoApp, {
user: graphql`
fragment TodoApp_user on User {
id
userId
totalCount
completedCount
...TodoListFooter_user
}
`,
});
/*
...TodoListFooter_user
*/
{hasTodos && }
Retry
Purge
Double-click to edit a todo
{/* TODO fix layout */}
);
};
export default createFragmentContainer(AppTodo, {
user: graphql`
fragment TodoApp_user on User {
id
userId
totalCount
completedCount
...TodoListFooter_user
...TodoList_user
}
`,
});
},
header: {
},
welcome: {
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
});
export default createFragmentContainer(TodoApp, {
user: graphql`
fragment TodoApp_user on User {
id
userId
totalCount
completedCount
...TodoListFooter_user
...TodoList_user
}
`,
});
/*
...TodoListFooter_user
*/