import { ColorMapping } from 'src/application/models/colorsConfig';
import { isGraphQLColorsConfig } from 'src/application/models/guards/graphQL/isGraphQLColorsConfig';

export const validateGraphQLColorsConfig = (data: unknown): ColorMapping | undefined => {
  if (!isGraphQLColorsConfig(data)) {
    return undefined;
  }
  return data as unknown as ColorMapping;
};
