How to use the apollo-angular.Mutation function in apollo-angular

To help you get started, we’ve selected a few apollo-angular examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Urigo / WhatsApp-Clone-Client-Angular / src / graphql.ts View on Github external
providedIn: "root"
})
export class RemoveChatGQL extends Apollo.Mutation<
  RemoveChat.Mutation,
  RemoveChat.Variables
> {
  document: any = gql`
    mutation RemoveChat($chatId: ID!) {
      removeChat(chatId: $chatId)
    }
  `;
}
@Injectable({
  providedIn: "root"
})
export class RemoveMessagesGQL extends Apollo.Mutation<
  RemoveMessages.Mutation,
  RemoveMessages.Variables
> {
  document: any = gql`
    mutation RemoveMessages($chatId: ID!, $messageIds: [ID!]) {
      removeMessages(chatId: $chatId, messageIds: $messageIds)
    }
  `;
}

// ====================================================
// END: Apollo Angular template
// ====================================================
github visual-knight / platform-community-edition / apps / visual-knight / src / app / modules / core / types.ts View on Github external
AllVariationsQueryVariables
> {
  document = AllVariationsDocument;
}
export const DeleteVariationDocument = gql`
  mutation deleteVariation($id: String!) {
    deleteVariation(variationId: $id) {
      id
    }
  }
`;

@Injectable({
  providedIn: 'root'
})
export class DeleteVariationGQL extends Apollo.Mutation<
  DeleteVariationMutation,
  DeleteVariationMutationVariables
> {
  document = DeleteVariationDocument;
}
export const AcceptNewBaselineDocument = gql`
  mutation acceptNewBaseline(
    $testSessionId: String!
    $variationId: String!
    $comment: String
  ) {
    acceptNewBaseline(
      variationId: $variationId
      testSessionId: $testSessionId
      comment: $comment
    ) {
github Urigo / WhatsApp-Clone-Client-Angular / src / graphql.ts View on Github external
addChat(userId: $userId) {
        ...ChatWithoutMessages
        messages {
          ...Message
        }
      }
    }

    ${ChatWithoutMessagesFragment}
    ${MessageFragment}
  `;
}
@Injectable({
  providedIn: "root"
})
export class AddGroupGQL extends Apollo.Mutation<
  AddGroup.Mutation,
  AddGroup.Variables
> {
  document: any = gql`
    mutation AddGroup($userIds: [ID!]!, $groupName: String!) {
      addGroup(userIds: $userIds, groupName: $groupName) {
        ...ChatWithoutMessages
        messages {
          ...Message
        }
      }
    }

    ${ChatWithoutMessagesFragment}
    ${MessageFragment}
  `;
github sourcenetwork / ng-oidc-client / projects / ng-oidc-client / src / lib / graphql / generated / graphql.ts View on Github external
})
export class IdentityGQL extends Apollo.Query {
  document: any = gql`
    query identity {
      identity @client {
        ...IdentityFields
      }
    }

    ${IdentityFieldsFragment}
  `;
}
@Injectable({
  providedIn: 'root'
})
export class AddIdentityGQL extends Apollo.Mutation {
  document: any = gql`
    mutation addIdentity($identity: IdentityInput) {
      addIdentity(identity: $identity) @client {
        ...IdentityFields
      }
    }

    ${IdentityFieldsFragment}
  `;
}
@Injectable({
  providedIn: 'root'
})
export class UpdateNgOidcInfoGQL extends Apollo.Mutation {
  document: any = gql`
    mutation updateNgOidcInfo($info: NgOidcInfoInput) {
github sourcenetwork / ng-oidc-client / projects / ng-oidc-client / src / lib / graphql / generated / graphql.ts View on Github external
})
export class AddIdentityGQL extends Apollo.Mutation {
  document: any = gql`
    mutation addIdentity($identity: IdentityInput) {
      addIdentity(identity: $identity) @client {
        ...IdentityFields
      }
    }

    ${IdentityFieldsFragment}
  `;
}
@Injectable({
  providedIn: 'root'
})
export class UpdateNgOidcInfoGQL extends Apollo.Mutation {
  document: any = gql`
    mutation updateNgOidcInfo($info: NgOidcInfoInput) {
      updateNgOidcInfo(info: $info) @client {
        ...NgOidcInfoFields
      }
    }

    ${NgOidcInfoFieldsFragment}
  `;
}
@Injectable({
  providedIn: 'root'
})
export class NgOidcInfoGQL extends Apollo.Query {
  document: any = gql`
    query ngOidcInfo {
github visual-knight / platform-community-edition / apps / visual-knight / src / app / modules / core / types.ts View on Github external
> {
  document = AllProjectsDocument;
}
export const AddProjectDocument = gql`
  mutation addProject($name: String!, $description: String) {
    createProject(data: { name: $name, description: $description }) {
      ...ProjectData
    }
  }
  ${ProjectDataFragmentDoc}
`;

@Injectable({
  providedIn: 'root'
})
export class AddProjectGQL extends Apollo.Mutation<
  AddProjectMutation,
  AddProjectMutationVariables
> {
  document = AddProjectDocument;
}
export const DeleteProjectDocument = gql`
  mutation deleteProject($projectId: String!) {
    deleteProject(projectId: $projectId) {
      id
    }
  }
`;

@Injectable({
  providedIn: 'root'
})

apollo-angular

Use your GraphQL data in your Angular app, with the Apollo Client

MIT
Latest version published 1 month ago

Package Health Score

92 / 100
Full package analysis