# Socials Mutations

These are the mutations defined under the socials gql model

# postOnToSocials

    postOnToSocials(
        text: String!, 
        upload: Upload, 
        telegram: Boolean, 
        linkedin: Boolean, 
        twitter: Boolean, 
        channel: String, 
        facebook: Boolean, 
        pageUrl: String
    ): PublishedPost
1
2
3
4
5
6
7
8
9
10

mutation for posting content onto social medias at once

  • text: The text content / label of the post to publish on social platforms
  • upload: A single image file item optional
  • telegram: A boolean flag to determine if we should publish to a telegram channel as well
  • linkedin: A boolean flag to determine if we should publish to linkedin as well
  • twitter: A boolean flag to determine if we should tweet to twitter as well
  • channel: The telegram channel to post onto
  • facebook: A boolean flag to determine if we should publish to facebook as well
  • pageUrl: The facebook page to post onto

# Output

The above mutation returns another schema which contains the success check boolean for each platform alongside the error if any actually happened.

# Graphql Schema

gql schema for this model goes

type PublishedPost {
    text: String
    telegram: Boolean
    twitter: Boolean
    errors: PostError
    linkedin: Boolean
    facebook: Boolean
    filename: String
    mimetype: String
    encoding: String
}

type PostError {
    facebook: String
    twitter: String
    linkedin: String
    telegram: String
}

extend type Mutation {
    postOnToSocials(
        text: String!, 
        upload: Upload, 
        telegram: Boolean, 
        linkedin: Boolean, 
        twitter: Boolean, 
        channel: String, 
        facebook: Boolean, 
        pageUrl: String
    ): PublishedPost
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31