mirror of
https://github.com/dwaxweiler/connector-mobilizon
synced 2025-06-05 21:59:25 +02:00
first commit
This commit is contained in:
19
source/connector-mobilizon/front/graphql-wrapper.js
Normal file
19
source/connector-mobilizon/front/graphql-wrapper.js
Normal file
@ -0,0 +1,19 @@
|
||||
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)
|
||||
}
|
Reference in New Issue
Block a user