Fetch jwt token from hasura-auth with refresh_token

This commit is contained in:
Charles Bochet
2023-04-21 14:07:02 +02:00
parent f98f0e942e
commit c5f2850a3b
26 changed files with 212 additions and 61 deletions

View File

@ -14,8 +14,8 @@ const StyledPeopleContainer = styled.div`
`;
export const GET_PEOPLE = gql`
query GetPeople($orderBy: [person_order_by!]) {
person(order_by: $orderBy) {
query GetPeople($orderBy: [persons_order_by!]) {
persons(order_by: $orderBy) {
id
phone
email
@ -57,7 +57,7 @@ function People() {
setOrderBy(sorts.length ? reduceSortsToOrderBy(sorts) : defaultOrderBy);
};
const { data } = useQuery<{ person: GraphqlPerson[] }>(GET_PEOPLE, {
const { data } = useQuery<{ persons: GraphqlPerson[] }>(GET_PEOPLE, {
variables: { orderBy: orderBy },
});
@ -66,7 +66,7 @@ function People() {
<StyledPeopleContainer>
{
<Table
data={data ? data.person.map(mapPerson) : []}
data={data ? data.persons.map(mapPerson) : []}
columns={peopleColumns}
viewName="All People"
viewIcon={faList}

View File

@ -22,7 +22,7 @@ const mocks = [
},
result: {
data: {
person: defaultData,
persons: defaultData,
},
},
},