@tobiastengler/create-relay-app
Version:
Easy configuration of Relay for existing projects
24 lines (23 loc) • 698 B
JavaScript
import { ArgumentBase } from "./ArgumentBase.js";
export class SubscriptionsArgument extends ArgumentBase {
constructor() {
super(...arguments);
this.name = "subscriptions";
this.promptMessage = "Do you want to setup Subscriptions";
}
registerCliOption(command) {
const flags = this.getCliFlags();
command.option(flags, "setup GraphQL subscriptions using graphql-ws");
}
promptForValue(existingArgs) {
return this.showInquirerPrompt({
type: "confirm",
}, existingArgs);
}
isValid(value, existingArgs) {
return true;
}
async getDefaultValue(existingArgs) {
return false;
}
}