title: Am I using GraphQL incorrectly? I don't know how it sends me back data
body: <p>So I'm working on a project that wants me to use GraphQL  to create my API. I'm also using NodeJS and Express. Normally I'd just set up an endpoint in express and call it with axios from the client side. Inside the endpoint on the server, I could then take the information from req.body and do with it what I want. Where would I be able to manipulate the data in that same way using GraphQL? It feels like all I'm doing is querying for data instead of manipulating it and sending it back like I want to.</p>
  
  <p>Here's what I have:</p>
  
  <p>Schema graphql:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import GraphQLDate from 'graphql-date';
  
  const {
    GraphQLObjectType,
    GraphQLString,
    GraphQLInt,
    GraphQLSchema,
    GraphQLList,
    GraphQLNonNull,
  } = require('graphql');
  
  
  const SecretMessage = new GraphQLObjectType({
    name: 'secretMessage',
    fields: () =&gt; ({
      id: { type: GraphQLString },
      name: { type: GraphQLString },
      message: { type: GraphQLString },
      expirDate: { type: GraphQLDate },
    }),
  });
  
  const RootQuery = new GraphQLObjectType({
    name: 'RootQueryType',
    fields: {
      secretMessage: {
        type: SecretMessage,
        args: {
          name: { type: GraphQLString },
        },
        resolve(parVal, args) {
          return `${args.name}test`;
        },
      },
    },
  });
  
  module.exports = new GraphQLSchema({
    query: RootQuery,
  });</code></pre>
  </div>
  </div>
  </p>
  
  <p>My node server:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import express from 'express';
  import path from 'path';
  import bodyParser from 'body-parser';
  import webpack from 'webpack';
  
  const config = require('../webpack.config.js');
  const expressGraphQL = require('express-graphql');
  const schema = require('./schema.js');
  
  
  const compiler = webpack(config);
  const port = process.env.PORT || 3000;
  
  const app = express();
  
  
  app.use(bodyParser.json());
  app.use(bodyParser.urlencoded({ extended: true }));
  
  app.use(express.static('public'));
  app.use(express.static('css'));
  app.use(express.static('images'));
  
  app.use('/graphql', expressGraphQL({
    schema,
    graphiql: true,
  }));
  
  app.get('/', (req, res) =&gt; {
    res.sendFile(path.join(__dirname, '../public/src', 'index.html'));
  });
  
  app.get('#', (req, res) =&gt; {
    console.log('Pound hashtag works');
  });
  
  app.post('passphrase', (req, res) =&gt; {
    console.log('passphrase tag works');
  });
  
  app.get('*', (req, res) =&gt; {
    res.sendFile(path.join(__dirname, '../public/src', 'index.html'));
  });
  
  app.listen(port, (error) =&gt; {
    if (error) {
      console.log('This is the express error: ', error);
    } else {
      console.log('Express is listening on port: ', port);
    }
  });</code></pre>
  </div>
  </div>
  </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>    axios({
        method: 'post',
        url: '/graphql',
        data: JSON.stringify({
          query: `secretMessage(name: "${this.state.name}") {name}`,
        }),
      }).then((response) =&gt; {
        console.log('This is the response from the axios call: ', response);
      }).catch((error) =&gt; {
        console.log('This is the error from the main axios call: ', error);
      });</code></pre>
  </div>
  </div>
  </p>
  
  <p>When I make an axios post call to /graphql, i just get a 400 bad request error.</p>
  
  <p>The 'test' thing next to the string interpolation was me just trying to see if I could manipulate what data is there. I didn't know how to test it in postman though. Any thoughts?</p>