Coder Social home page Coder Social logo

Comments (9)

bahdcoder avatar bahdcoder commented on May 29, 2024

@sadewole thanks for testing it out and reporting the bug. To bypass this error so you're not stuck right now, please run yarn add graphql-parse-resolve-info. But by the end of today (when all currently open pull requests are merged), the packages will be stable and I'll ping you to let you know when to test again. Thanks !

from tensei.

sadewole avatar sadewole commented on May 29, 2024

Thanks for the response. Your response help but I also had to install graphql.

And I think I'll have to wait till the issue is resolved.

from tensei.

sadewole avatar sadewole commented on May 29, 2024

Trying to use postman to query requests.
/auth/register
/auth/me

But getting:
{
"message": "Internal server error.",
"error": {}
}

from tensei.

bahdcoder avatar bahdcoder commented on May 29, 2024

hey @sadewole as promised all of these errors should be fixed now. Please let me know if you run into any more trouble.

from tensei.

sadewole avatar sadewole commented on May 29, 2024

Thanks, @bahdcoder.
Everything is now working as expected.

from tensei.

sadewole avatar sadewole commented on May 29, 2024

Hello @bahdcoder, I'm currently having a CORS error on my spa frontend app. Please, is there any way that can be fixed or any middleware I should apply to prevent that?

from tensei.

bobbylemm avatar bobbylemm commented on May 29, 2024

@sadewole kindly give us a few minutes to investigate this, I would get back to you shortly. thanks

from tensei.

bobbylemm avatar bobbylemm commented on May 29, 2024

Hello @sadewole, thanks for reporting. Modifying the underlying express application will be documented soon. Here's what you should do to add a middleware to your application:

  • Install cors using yarn add cors
  • Next, to get access to the express app, you may use the .register() hook on the tensei app like so:
const cors = require('cors')
const { tensei } = require('@tensei/core')

tensei()
    .register(({ app }) => {
         app.use(cors())
     })

That should implement cors on your routes just like in a normal express application.

Please let us know if you need anything else. Thanks !

from tensei.

sadewole avatar sadewole commented on May 29, 2024

Hello @sadewole, thanks for reporting. Modifying the underlying express application will be documented soon. Here's what you should do to add a middleware to your application:

  • Install cors using yarn add cors
  • Next, to get access to the express app, you may use the .register() hook on the tensei app like so:
const cors = require('cors')
const { tensei } = require('@tensei/core')

tensei()
    .register(({ app }) => {
         app.use(cors())
     })

That should implement cors on your routes just like in a normal express application.

Please let us know if you need anything else. Thanks !

@bobbylemm I'm sorry I've not responded for a while now...been busy tho.
Your solution isn't working. And I still receive the same error.
I don't know if the Tensei package has been updated. Maybe reinstalling will solve it.

from tensei.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.