Demo entry 6783250

Data-Source

   

Submitted by Tim on Feb 05, 2019 at 13:30
Language: JavaScript. Code size: 468 Bytes.

const {gql} = require('../src')

module.exports = {
  name: 'article',

  typeDefs: gql`
    type Query {
      article: Article
    }
    type Article {
      title: STring
    }
  `,
  resolvers: {
  Query: {
    article(){
    return {
    title: 'asfsdfafd'
    }
    }
  }
  },
  extendTypes: gql`
    extend type Article {
      teaser: Teaser
    }
  `
  extendResolvers: {
    Article: {
      teaser: teaserResolver
    }
  }
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).