Is there a way to pass a fragment to graphiql?

Viewed 2890

It's possible to pass a query, but apparently not a fragment:

server.use('/graphiql', graphiqlExpress({
    endpointURL: '/graphql',
    query: `# Welcome to GraphiQL

query PostsForAuthor {
  author(id: 1) {
    firstName
    posts {
      title
      votes
    }
  }
}`}));


Update 10/12/2017 It is possible to send fragments along with a query using Apollo's client:

http://dev.apollodata.com/core/fragments.html

This is not a solution to the original question, however; I would like to pass fragments to a graphiql server instance at startup.

2 Answers
Related