UNPKG

compass-docgen

Version:

This is a package that will help you to create your documentation for yours components

53 lines (49 loc) 1.55 kB
// @ts-ignore import { gql } from '@apollo/client'; import { BaseAction } from './Base.actions'; export class ComponentAction extends BaseAction { public static menuItems() { // const query = gql` // fragment ComponentWithChilds on Component { // name // childs { // ...ComponentWithChilds // } // } // query GetComponents($componentName: String!) { // component(name: $componentName) { // ...ComponentWithChilds // } // } // `; // graphql(CurrentUserForLayout, { // options: { variables: { avatarID: 1 } }, // })(Profile); // } return gql` query ScopedComponents($scope: String) { components(scope: $scope) { name description docPath basePath props } } `; } public static get() { return gql` query ScopedComponents($filePath: String!) { component(filePath: $filePath) { name version description docPath basePath props } } `; } }