Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const Home = props => {
const {loading, error, data, ...others} = useQuery(USER_TODOS, {
variables: {
// Mock authenticated ID that matches database
userId: 'me',
},
});
if (loading) return <div>;
if (error) return `Error! ${error.message}`;
return ;
};
</div>
const Home = props => {
const {loading, error, data, ...others} = useQuery(USER_TODOS, {
variables: {
// Mock authenticated ID that matches database
userId: 'you',
},
});
if (loading) return <div>;
if (error) return `Error! ${error.message}`;
return ;
};
</div>