-1

I got error when i try to create scheduled event.

data: { code: 'not-found', error: 'resource does not exist', path: '$'}

Here is the code i used:

const add_event = await axios("http://localhost:8080/v1/graphql/query", {
    method: "POST",
    data: JSON.stringify(schedule_event),
    headers: {
      "x-hasura-admin-secret": process.env.HASURA_ADMIN_SECRET,
    },
  });
  const event_data = add_event.data;
  console.log(event_data);

1 Answers1

0

This error occurs due to invalid or wrong endpoint decleration. Correct endpoint for the scheduled event should be "http://localhost:8080/v1/query".