polen
Version:
A framework for delightful GraphQL developer portals
33 lines • 3.76 kB
JavaScript
export const isTypeOperation = (change) => change.type === `TYPE_ADDED` || change.type === `TYPE_REMOVED` || change.type === `TYPE_KIND_CHANGED`;
export const isTypeDescription = (change) => change.type === `TYPE_DESCRIPTION_ADDED` || change.type === `TYPE_DESCRIPTION_REMOVED`
|| change.type === `TYPE_DESCRIPTION_CHANGED`;
export const isFieldOperation = (change) => change.type === `FIELD_ADDED` || change.type === `FIELD_REMOVED` || change.type === `FIELD_TYPE_CHANGED`;
export const isFieldDescription = (change) => change.type === `FIELD_DESCRIPTION_ADDED` || change.type === `FIELD_DESCRIPTION_REMOVED`
|| change.type === `FIELD_DESCRIPTION_CHANGED`;
export const isFieldDeprecation = (change) => change.type === `FIELD_DEPRECATION_ADDED` || change.type === `FIELD_DEPRECATION_REMOVED`;
export const isFieldDeprecationReason = (change) => change.type === `FIELD_DEPRECATION_REASON_ADDED` || change.type === `FIELD_DEPRECATION_REASON_REMOVED`
|| change.type === `FIELD_DEPRECATION_REASON_CHANGED`;
export const isFieldArgumentOperation = (change) => change.type === `FIELD_ARGUMENT_ADDED` || change.type === `FIELD_ARGUMENT_REMOVED`;
export const isFieldArgument = (change) => change.type === `FIELD_ARGUMENT_DEFAULT_CHANGED` || change.type === `FIELD_ARGUMENT_TYPE_CHANGED`;
export const isFieldArgumentDescription = (change) => change.type === `FIELD_ARGUMENT_DESCRIPTION_CHANGED`;
export const isEnumValueOperation = (change) => change.type === `ENUM_VALUE_ADDED` || change.type === `ENUM_VALUE_REMOVED`;
export const isEnumValueDescription = (change) => change.type === `ENUM_VALUE_DESCRIPTION_CHANGED`;
export const isEnumValueDeprecationReason = (change) => change.type === `ENUM_VALUE_DEPRECATION_REASON_ADDED` || change.type === `ENUM_VALUE_DEPRECATION_REASON_REMOVED`
|| change.type === `ENUM_VALUE_DEPRECATION_REASON_CHANGED`;
export const isInputFieldOperation = (change) => change.type === `INPUT_FIELD_ADDED` || change.type === `INPUT_FIELD_REMOVED`
|| change.type === `INPUT_FIELD_TYPE_CHANGED`;
export const isInputFieldDescription = (change) => change.type === `INPUT_FIELD_DESCRIPTION_ADDED` || change.type === `INPUT_FIELD_DESCRIPTION_REMOVED`
|| change.type === `INPUT_FIELD_DESCRIPTION_CHANGED`;
export const isInputFieldDefaultValue = (change) => change.type === `INPUT_FIELD_DEFAULT_VALUE_CHANGED`;
export const isUnionMemberOperation = (change) => change.type === `UNION_MEMBER_ADDED` || change.type === `UNION_MEMBER_REMOVED`;
export const isObjectTypeInterfaceOperation = (change) => change.type === `OBJECT_TYPE_INTERFACE_ADDED` || change.type === `OBJECT_TYPE_INTERFACE_REMOVED`;
export const isDirectiveOperation = (change) => change.type === `DIRECTIVE_ADDED` || change.type === `DIRECTIVE_REMOVED`;
export const isDirectiveDescription = (change) => change.type === `DIRECTIVE_DESCRIPTION_CHANGED`;
export const isDirectiveLocationOperation = (change) => change.type === `DIRECTIVE_LOCATION_ADDED` || change.type === `DIRECTIVE_LOCATION_REMOVED`;
export const isDirectiveArgumentOperation = (change) => change.type === `DIRECTIVE_ARGUMENT_ADDED` || change.type === `DIRECTIVE_ARGUMENT_REMOVED`;
export const isDirectiveArgument = (change) => change.type === `DIRECTIVE_ARGUMENT_DEFAULT_VALUE_CHANGED` || change.type === `DIRECTIVE_ARGUMENT_TYPE_CHANGED`;
export const isDirectiveArgumentDescription = (change) => change.type === `DIRECTIVE_ARGUMENT_DESCRIPTION_CHANGED`;
export const isSchemaRootType = (change) => change.type === `SCHEMA_QUERY_TYPE_CHANGED` || change.type === `SCHEMA_MUTATION_TYPE_CHANGED`
|| change.type === `SCHEMA_SUBSCRIPTION_TYPE_CHANGED`;
export const isDirectiveUsage = (change) => change.type.startsWith(`DIRECTIVE_USAGE_`);
//# sourceMappingURL=change-groups.js.map