connector-wordpress/source/connector-mobilizon/front/graphql-wrapper.js

20 lines
310 B
JavaScript
Raw Normal View History

2021-01-08 14:08:40 +01:00
import { request, gql } from 'graphql-request'
export function getEvents({ url, limit }) {
const query = gql`
query {
events(limit:${limit}) {
elements {
id,
title,
url,
beginsOn,
endsOn
},
total
}
}
`
return request(url, query)
}