diff --git a/index.mjs b/index.mjs index 6e4bea5..9291924 100644 --- a/index.mjs +++ b/index.mjs @@ -72,18 +72,17 @@ const server = Server.configure({ headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ query: `query { - get_shout(shout_id: $shout_id) { + get_shout(shout_id: ${shout_id}) { id slug authors } } - `, - variables: { shout_id }, + ` }), }) .then(res => res.json()) - .then((data) => { + .then(({ data }) => { console.debug('shout data:', data) const { authors } = data.get_shout; if (authors.includes(author_id)) {