2018-11-06 09:30:27 +00:00
|
|
|
import gql from 'graphql-tag';
|
|
|
|
|
2019-01-21 14:08:22 +00:00
|
|
|
export const FETCH_PERSON = gql`
|
2018-11-06 09:30:27 +00:00
|
|
|
query($name:String!) {
|
2019-01-21 14:08:22 +00:00
|
|
|
person(preferredUsername: $name) {
|
2018-11-06 09:30:27 +00:00
|
|
|
url,
|
|
|
|
name,
|
|
|
|
domain,
|
|
|
|
summary,
|
|
|
|
preferredUsername,
|
|
|
|
suspended,
|
|
|
|
avatarUrl,
|
|
|
|
bannerUrl,
|
|
|
|
organizedEvents {
|
|
|
|
uuid,
|
2019-01-21 14:08:22 +00:00
|
|
|
title
|
2018-11-06 09:30:27 +00:00
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2019-01-21 14:08:22 +00:00
|
|
|
export const LOGGED_PERSON = gql`
|
2018-11-06 09:30:27 +00:00
|
|
|
query {
|
2019-01-21 14:08:22 +00:00
|
|
|
loggedPerson {
|
|
|
|
id,
|
2018-11-06 09:30:27 +00:00
|
|
|
avatarUrl,
|
|
|
|
preferredUsername,
|
|
|
|
}
|
|
|
|
}`;
|
2019-01-21 14:08:22 +00:00
|
|
|
|
|
|
|
export const IDENTITIES = gql`
|
|
|
|
query {
|
|
|
|
identities {
|
|
|
|
avatarUrl,
|
|
|
|
preferredUsername,
|
|
|
|
name
|
|
|
|
}
|
|
|
|
}`;
|
|
|
|
|
|
|
|
export const CREATE_PERSON = gql`
|
|
|
|
mutation CreatePerson($preferredUsername: String!) {
|
|
|
|
createPerson(preferredUsername: $preferredUsername) {
|
|
|
|
preferredUsername,
|
|
|
|
name,
|
|
|
|
avatarUrl
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`
|