<commit_before>import gql from 'graphql-tag';
import { graphql } from 'react-apollo';

import NewContentModal from '../components/NewContentModal';

const createContent = graphql(
  gql`
    mutation CreateContent($description: String!, $type: String!, $data: String!) {
      createContent(input: {description: $description, type: $type, data: $data}) {
        content {
          data
          description
          type
          id
        }
      }
    }
  `,
  {
    props: ({ mutate }) => ({
      createContent: content => mutate({
        variables: content,
        optimisticResponse: {
          __typename: 'Mutation',
          createContent: {
            __typename: 'Content',
            content: {...content, id: 'temp'},
          },
        },
        updateQueries: {
          Content: (prev, { mutationResult: { data } }) => {
            const newState = ({
              content: prev.content.concat(data.createContent.content)
            });
            return newState;
          },
        },
      }),
    }),
  }
);

export default createContent(NewContentModal);<commit_msg>Added trailing comma<commit_after>import gql from 'graphql-tag';
import { graphql } from 'react-apollo';

import NewContentModal from '../components/NewContentModal';

const createContent = graphql(
  gql`
    mutation CreateContent($description: String!, $type: String!, $data: String!) {
      createContent(input: {description: $description, type: $type, data: $data}) {
        content {
          data
          description
          type
          id
        }
      }
    }
  `,
  {
    props: ({ mutate }) => ({
      createContent: content => mutate({
        variables: content,
        optimisticResponse: {
          __typename: 'Mutation',
          createContent: {
            __typename: 'Content',
            content: {...content, id: 'temp'},
          },
        },
        updateQueries: {
          Content: (prev, { mutationResult: { data } }) => {
            const newState = ({
              content: prev.content.concat(data.createContent.content),
            });
            return newState;
          },
        },
      }),
    }),
  }
);

export default createContent(NewContentModal);
{'fraction_non_alphanumeric': 0.1307277628032345, 'fraction_numerical': 0.0, 'mean_word_length': 1.8809831824062095, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '813349', 'n_tokens_mistral': 604, 'n_tokens_neox': 594, 'n_words': 133}