title: What and How does Relay and GraphQL interfaces work?
body: <p>we define a type in GraphQL like this:</p>
  
  <pre><code>  const GraphQLTodo = new GraphQLObjectType({
    name: 'Todo',
    fields: {
      id: globalIdField('Todo'),
      text: {
        type: GraphQLString,
        resolve: (obj) =&gt; obj.text,
      },
      complete: {
        type: GraphQLBoolean,
        resolve: (obj) =&gt; obj.complete,
      },
    },
    interfaces: [nodeInterface], // what is this?
  });
  </code></pre>
  
  <p>and I've read there is GraphQLInterfaceType - is more suitable when the types are basically the same but some of the fields are different(is this something like a foreign key?) </p>
  
  <p>and in Relay we get the nodefield and nodeInterface with nodeDefinitions:</p>
  
  <pre><code>const {nodeInterface, nodeField} = nodeDefinitions(
    (globalId) =&gt; {
      const {type, id} = fromGlobalId(globalId); 
      if (type === 'Todo') {
        return getTodo(id);
      } else if (type === 'User') {
        return getUser(id);
      }
      return null;
    },
    (obj) =&gt; {
      if (obj instanceof Todo) {
        return GraphQLTodo;
      } else if (obj instanceof User) {
        return GraphQLUser;
      }
      return null;
    }
  );
  </code></pre>
  
  <p>The docs and samples only used one on interfaces: [] //it's an array. but when do I need to use many interfaces? I am just confused on what it is, I've read a lot about it(don't know if my understanding is correct), just can't seem to wrap it in my head</p>