https://www.prisma.io/ logo
Join SlackCommunities
Powered by
# prisma-whats-new
  • h

    hardys

    06/13/2017, 4:20 AM
    Wow great thank you so much
    👍 2
  • w

    wallslide

    06/13/2017, 4:52 AM
    currently getting
    Copy code
    Unhandled GraphQL subscription error [Error: Subscription timed out - no response from server
    and
    Copy code
    VM25988:37 WebSocket connection to '<wss://subscriptions.graph.cool/v1/*******>' failed: Connection closed before receiving a handshake response
    a
    e
    +3
    • 6
    • 47
  • i

    iamrommel

    06/13/2017, 8:23 AM
    i found out that you have the graphql-up (https://www.graph.cool/graphql-up/), can we implement this on our own server? From the examples, it always generate the endpoints from the graph.cool domains. I want it to be generated on my own server, is that possible? Any thoughts?
  • i

    idkjsx

    06/13/2017, 8:48 AM
    Check out this cli issue folks. https://github.com/graphcool/graphcool-cli/issues/95
  • c

    codepreneur

    06/13/2017, 9:17 AM
    guys
  • c

    codepreneur

    06/13/2017, 9:17 AM
    how do you make graphcool work with relay modern?
    n
    • 2
    • 2
  • c

    codepreneur

    06/13/2017, 9:18 AM
    with relay classic I would have babelRelayPlugin.js file
  • c

    codepreneur

    06/13/2017, 9:18 AM
    Copy code
    const babelRelayPlugin = require('babel-plugin-relay')
    const { introspectionQuery, printSchema } = require('graphql/utilities')
    const request = require('sync-request')
    
    const graphqlHubUrl = '<https://graph.cooll>'
    
    const response = request('POST', graphqlHubUrl, {
      qs: {
        query: introspectionQuery
      }
    })
    
    console.log('response ', response)
    
    const schema = JSON.parse(response.body.toString('utf-8'))
    
    console.log('schema ', schema)
    
    module.exports = babelRelayPlugin(schema.data, {
      abortOnError: true
    })
  • c

    codepreneur

    06/13/2017, 9:18 AM
    and then inside
  • c

    codepreneur

    06/13/2017, 9:18 AM
    Copy code
    module: {
        loaders: [
          {
            test: /\.js$/,
            exclude: /node_modules/,
            loader: 'babel-loader',
            query: {
              presets: ['es2015', 'react', 'stage-2'],
              plugins: ['transform-class-properties', __dirname + '/src/babelRelayPlugin']
            }
          },
  • c

    codepreneur

    06/13/2017, 9:18 AM
    webpack.config.js
  • c

    codepreneur

    06/13/2017, 9:18 AM
    and it would work
  • c

    codepreneur

    06/13/2017, 9:18 AM
    on npm start it would generate schema and pass it to babel plugin
  • c

    codepreneur

    06/13/2017, 9:18 AM
    but with new babel-plugin-relay
  • c

    codepreneur

    06/13/2017, 9:18 AM
    it doesnt work
  • c

    codepreneur

    06/13/2017, 9:19 AM
    I get
  • c

    codepreneur

    06/13/2017, 9:19 AM
    Copy code
    ERROR in ./src/main.js
    Module build failed: TypeError: auth/src/main.js: Cannot read property 'functionExpression' of undefined
  • c

    codepreneur

    06/13/2017, 9:21 AM
    if I try to print the schema for relay compiler to use later on
  • c

    codepreneur

    06/13/2017, 9:21 AM
    Copy code
    const babelRelayPlugin = require('babel-plugin-relay')
    const { introspectionQuery, printSchema } = require('graphql/utilities')
    const path = require('path')
    const fs = require('fs')
    const request = require('sync-request')
    
    const graphqlHubUrl = '<https://graphql.cool>'
    
    const response = request('POST', graphqlHubUrl, {
      qs: {
        query: introspectionQuery
      }
    })
    
    console.log('response ', response)
    
    const schema = JSON.parse(response.body.toString('utf-8'))
    
    console.log('schema ', schema)
    const graphQLFile = path.join(__dirname, 'schema.graphql')
    fs.writeFileSync(graphQLFile, printSchema(schema));
    
    module.exports = babelRelayPlugin(schema.data, {
      abortOnError: true
    })
  • c

    codepreneur

    06/13/2017, 9:21 AM
    I get:
  • c

    codepreneur

    06/13/2017, 9:21 AM
    Copy code
    ERROR in ./src/main.js
    Module build failed: TypeError: schema.getDirectives is not a function
        at printFilteredSchema (/auth/node_modules/graphql/utilities/schemaPrinter.js:70:27)
  • c

    codepreneur

    06/13/2017, 9:22 AM
    cause graphcool endpoint is set remotely
  • c

    codepreneur

    06/13/2017, 9:22 AM
    not locally like all the examples in the relay documentation show!
  • c

    codepreneur

    06/13/2017, 9:27 AM
    @nikolasburk how can I do it without .babelrc ?
  • c

    codepreneur

    06/13/2017, 9:27 AM
    and with babel transform instead?
  • c

    codepreneur

    06/13/2017, 9:27 AM
    I dont want the whole load of thing sthat comes with “create-react-app”
  • c

    codepreneur

    06/13/2017, 9:32 AM
    Copy code
    Module build failed: Error: Couldn't find preset "react-app" relative to directory
  • c

    codepreneur

    06/13/2017, 9:37 AM
    @nikolasburk the link you gave me to github example is really really complex example with really complex webpack configurations, its not simple at all 🙂
    n
    • 2
    • 1
  • p

    patrick_madx

    06/13/2017, 10:15 AM
    đź‘‹
    👋🏻 1
  • s

    sachins

    06/13/2017, 12:57 PM
    Hi, how can i pass additional data when uploading a file? example i want to pass userId of user who uploads it
    n
    • 2
    • 6
1...228229230...637Latest