nhost / nhost Goto Github PK
View Code? Open in Web Editor NEWThe Open Source Firebase Alternative with GraphQL.
Home Page: https://nhost.io
License: MIT License
The Open Source Firebase Alternative with GraphQL.
Home Page: https://nhost.io
License: MIT License
I've added these in but nothing is rendered. If I remove them then everything renders as normal. Has anybody seen this?
E.g.
const App: FC<AppProps> = ({ Component, pageProps }: AppProps) => { return ( <NhostAuthProvider auth={auth}> <NhostApolloProvider auth={auth} gqlEndpoint={process.env.GRAPHQL_ENDPOINT}> <ChakraProvider> <Component {...pageProps} /> </ChakraProvider> </NhostApolloProvider> </NhostAuthProvider> ); }
this just renders a blank page, but if I remove the Nhost providers it works as normal.
Hi. I am evaluating this new product. I've just following the getting started guide and tried to create a "todos" app but now the process has been stuck on the "Creating your project..." step (Nhost console) for days now. Even when I pick my answers and move ahead, the process does not complete and stays at this step for hours.
Dear @elitan ,
in the docs, i read about Custom APIs
( https://docs.nhost.io/custom-api ), which would really be an awesome feature.
Prior, i worked a lot with NestJS
( https://nestjs.com/ ), which is (at least for me) the go-to backend framework when i need to develop an API.
For larger project, i always followed a monorepository
approach (i.e., all of my applications (api, web application, mobile application, admin web application, ...) are stored within the same git repository. In this context, i used nrwl/nx
to structure / maintain my monorepository. However, nrwl/nx
has a predefined folder structure. For example, your apps are located within apps/
!
In this context, the custom api
would not work, because the api would be stored in apps/awesome-api
or whatever ;) Could you please make the api path
within the repository customizable? Somewhere in the Settings
page or whatever?
All the best,
Johannes
Use graphql-ws
instead of subscriptions-transport-ws
for the websocket client.
When working with Apollo when an item of the same __typename and same id came after a mutation, everything changed in the cache and therefore one didn't need to do any refetchQueries, and data from queries where these items where fetched would re-render automatically.
However, when using this package after mutating or creating a new item, I can see that the item is in the cache (by looking at apollo devtools) but the lists where these items are queried do not re-render automatically.
I wonder if there is a setting somewhere to enable this behavior.
Set ALLOWED_EMAIL_DOMAINS
in the Nhost console to specify what email domain names are allowed to register accounts.
Hi @elitan ,
For hasura's backend, testing and monitoring are almost non-existent right now. Hasura basic console does not offer the features for us to run regression testing and monitor the traffic. Is it possible to include this feature in the near future?
Thanks
x-hasura-admin-secret
)This is useful when sending GraphQL requests, managing files, signing up users, and sending function calls.
It should also be easy to toggle between making requests using the admin secret or not.
This is potentially confusing process at the moment, and it'd be nice if someone could follow a checklist.
assumption: every OSS app, is written for the people to use.
for that a setup-instruction is a necassary part.
please publish a how-to, docker-compose etc.
TIA
https://www.npmjs.com/package/jsonwebtoken
const decoded = jwt.verify(token, process.env.NHOST_JWT_KEY);
const userId = decoded["https://hasura.io/jwt/claims"]["x-hasura-user-id"];
For future reference and help let's document this use case.
Thanks
Nextjs example only shows client side rendering. Is it possible to expose the client so we can use getServerSideProps(), or is SSR not currently supported?
I had to remove and reconnect Nhost from my Github organization. Afterwards, I realized that the list of repos simply get added on instead of just refreshing to only show the current available repos. Here's a pic after I changed my repo's name a few times and connected and reconnected. There should only be two repos displaying, but instead, a new three get added every time I reconnect to my Github org.
It would be great to be able to specify a specific branch for a deployment other than the default branch. This would be ideal for situations where you have a production
branch and a staging
branch.
Currently in local development, I am able to access the x-hasura-user-id in a custom function by forwarding client headers. I access the user id this way below locally and it works.
const userId = req.body.session_variables["x-hasura-user-id"];
In the nhost production function, I am unable to access x-hasura-user-id. This is the error that was pulled from an nhost team member to help me debug:
(unsaved) test event
Response
{
"errorType": "Runtime.UnhandledPromiseRejection",
"errorMessage": "TypeError: Cannot read property 'x-hasura-user-id' of undefined",
"trace": [
"Runtime.UnhandledPromiseRejection: TypeError: Cannot read property 'x-hasura-user-id' of undefined",
" at process.<anonymous> (/var/runtime/index.js:35:15)",
" at process.emit (events.js:400:28)",
" at processPromiseRejections (internal/process/promises.js:245:33)",
" at processTicksAndRejections (internal/process/task_queues.js:96:32)"
]
I should be able to access the x-hasura-user-id from the session_variables the same way in production as I do in local development
From a usability standpoint having the Storage Rules under settings is confusing. It would be great to have it under the storage section.
This also seems like the experience could be easier if the Sign in methods and Authentication settings where moved under the Authentication section at the top of the console.
How can I use BatchHttpLink, which is really useful for combining multiple graphql requests into single HTTP request.
https://www.apollographql.com/docs/react/api/link/apollo-link-batch-http/
A versioning of the last saved storage rule settings would be great to "fallback" to the last working version.
Probably someone screwed up his rules and has a struggle right now.. probably that someone is me ...:-|
Does nHost support anonymous users?
If not, is there some way this could be achieve with the existing APIs?
... in an example/
folder in this repo
Login with Facebook, Google, Twitter, Microsoft, LinkedIn, Apple. etc are necessary.
As per App Store Review Guidelines we must include apple login if we use any third party login otherwise the app will be rejected :
https://developer.apple.com/app-store/review/guidelines/#sign-in-with-apple
So instead of adding new OAuth2 providers one by one. I request to create a general UI for any OAuth2 provider to work. By collection additional information.
Environment - Local/Nhost Dev
Machine - Apple M1 Macbook Pro
Issue
When trying to create a custom API, I installed the Twilio package and the nhost_api server crashed and logged the following
nhost_api | import net from 'net';
nhost_api | ^^^^^^
nhost_api |
nhost_api | SyntaxError: Cannot use import statement outside a module
nhost_api | at wrapSafe (internal/modules/cjs/loader.js:979:16)
nhost_api | at Module._compile (internal/modules/cjs/loader.js:1027:27)
nhost_api | at Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
nhost_api | at Object.require.extensions.<computed> [as .ts] (/usr/src/app/node_modules/ts-node/src/index.ts:1286:43)
nhost_api | at Module.load (internal/modules/cjs/loader.js:928:32)
nhost_api | at Function.Module._load (internal/modules/cjs/loader.js:769:14)
nhost_api | at Module.require (internal/modules/cjs/loader.js:952:19)
nhost_api | at require (internal/modules/cjs/helpers.js:88:18)
nhost_api | at /usr/src/app/index.ts:17:26
nhost_api | at Array.forEach (<anonymous>)
Expectation
I should be able to import an npm package without issue
There are two ways of getting a file URL:
public
role in Hasura must have access to the file in the GraphQL API.We could keep the getUrl
, deprecate it, and use it as an alias for getPublicUrl
.
With the new naming we would have two ways of getting a file URL:
getPublicUrl
getPresginedUrl
const token = auth.getJWTToken()
Many hosting platforms including firebase and heroku have "review apps" or unique deployments when a Pull Request is created. It would be amazing if you could have a way to create a temporary deployment for a pull request.
There should be a way to retrieve the Apollo client from Nhost so that queries can be read, written from the cache by users themselves.
E.g.,
const { client } = useNhostApollo()
Hi, I am unable to find CE edtion, need to signup and create host on nhost.io compulsorily.
Let me know regarding self host
The apollo devtools do not work with nhostapolloprovider. I can interact with the GraphiQl and run queries or mutations but the queries, mutations and cache tabs are empty. I have tested my other GraphQl apps (even ones running with Hasura api) and the browser extension works properly and is stable.
My current working versions for both browsers are:
Im on a Macbook
Chrome v. 89.0.4389.90
ApolloClient Devtools v. 3.0.2
@nhost/react-apollo 1.0.7
Firefox: latest
I am developing a react-native application, nhost.io looks very promising and inspiring for me.
But the main audience that my client is focused on is the iOs apps, so I am desperate about having an Apple id.
I see that you have it in the list here https://github.com/nhost/hasura-auth and here https://github.com/nhost/hasura-backend-plus but at the same time I see "we don't support Apple id" yet
Do we support it or not? If we do, can I expect to start developing an apple id application and within a month have the apple-id there? Or at least have something to set up apple-id by ourselves? Thank you!
Are there plans to add non self serving user management to hasura-auth?
Now users can register themselves and then manage their own user data, eg. password. It would be nice if such functionality - registering users with specific roles, changing their password, etc - would be also available to admins (eg. clients with x-hasura-admin-secret) so that they can manage their users.
I can now register new users from my backend via the auth JS SDK and can add roles by using the - what I think is private - API of hasura-auth, namely the Hasura graphql API exposed for the auth tables. Using the same API and looking at hasura-auth sources I could also implement password change for any of my users. However, this smells as I use these private API-s and the password hash function may change in the future.
So instead, it would be great to have an auth API, which can be used when passing x-hasura-admin-secret or similar along with the auth calls and which would allow managing any users under hasura-auth.
Or if you say that the Hasura exposed hasura-auth graphql API is intended for us developers as well and it will be officially documented, then it is also fine with me.
Currently, all user fields are snake_case.
According to https://docs.nhost.io/auth/custom-user-columns, these fields should not be deleted.
But using snake_case does fit well into the standard JavaScript convention to use camelCase.
Therefore, it would be neat if nhost supported camelCase.
Dear @elitan ,
first of all, thanks for creating this awesome project. Really happy to take a look, read the docs and find my way around. Looks very promising.
I am currently evaluating nhost
as a BaaS solution here at university for our next projects. I am not sure if this repository is the correct place to ask some general questions or request features - but i will try anyway. Please feel free to transfer this issue to any other repository, if it is more suitable.
In our institute, we support researchers from different domains in collecting, visualizing and analyzing (medical) health data. Based on our partners, we have a lot of "repeating projects" (i.e., deploy the same application over and over again for different scenarios, like tinnitus, diabetes, ...).
In order to easily manage these projects, i would like to have :
export
feature, that allows to quickly dump the entire project (i.e., the entire database schema with all relations, and so on)Can you point me into the right direction? Is this (already) possible? If so, how?
Can we add such a "schema description" file to our git repository and keep track of changes?
All the best,
Johannes
Hello guys,
I'm trying to work with "auth" and "recovery password" but It's not working correctly.
I get back this:
error: "Bad Request"
message: "\"email\" must be a string"
statusCode: 400
below my code:
auth.requestPasswordChange({
email: values.email,
})
.then()
.catch()
Is there a way to get the ticket? Reading the docs seems that is not possibile and the only way is to send the ticket by email.
I would get back the ticket and then pass It to the MailGun Api. Do you think is It possible to do It?
thank you.
Hey folks,
I am trying to change the Client login URL in the production dashboard, but it is still taking the old one after successful redirect.
For example.
I had localhost previously, now I have changed to the prod url, but after login it is still taking the localhost.
Please let me know if you need more info, I am happy to help.
It would be great to disable Anonymous registration from so that it cannot be controlled by an account admin. It seems that this could potentially be a security hole for some applications.
I am not sure if this belongs here or the backend plus.
For anyone coming after me, even on MacOS Docker actually exposes the ports correctly and if Mac Firewall is off the services are accessible from the local network (i.e. so that Expo Go can point to the local dev environment from a physical device).
For Expo, you can set the URLs as below, this makes the production builds point to the nhost cloud (you need to insert your URL here), the physical devices using Expo Go point to the IP of the machine running the Metro Bundler and the simulators run on the machine point to localhost.
TLDR: In Expo, to make development use the dev environment and production use production, see code below:
export const auth_url =
Constants.manifest.packagerOpts.dev && !Constants.isDevice
? "http://localhost:9001"
: typeof manifest.packagerOpts === `object` && manifest.packagerOpts.dev
? `http://${manifest.debuggerHost.split(`:`).shift().concat(`:9001`)}`
: "nhost.io cloud url";
I created a proposed PR nhost/docs#35 to include this in the docs under the nhost dev
section.
Hey,
not sure if this is the right place, but I couldn't find a support platform.
I am using Nuxt and followed the guide. Also used the same configurations from the nuxt example.
The auth is working fine, but I can't query anything.
I have only 2 tables
notes is a basic table with
When I test the queries from within hasura, everything works fine. But I can't query anything from within my application.
I always get this error
Error no subscriptions exist
apollo-module.js?0d2d:84 Error GraphQL error: field "notes" not found in type: 'query_root'
apollo-module.js?0d2d:84 Error GraphQL error: field "notes" not found in type: 'query_root'
Hasura Storage supports adding image transformation query parameters to manipulate the image on the fly. The SDK should make it easy to use them.
The following query parameters can be added to both public URLs and presigned URLs:
w
(width)h
(height)q
(quality)b
(blur)r
(radius)Yo guys, what if you will consider for the future to use ory stack for auth Z/N? - https://www.ory.sh
ory kratos for user management
ory oathkeeper for authorization
would love to hear from you guys what do you think about this.
In the Todos documentation example, the table is created with the field is_completed
but later in the documentation completed
is used:
App.js
code snippet in the subscription
queryHello there!
I'm trying to change the password as logged In user. I read docs here
When I send the request I get this error (even if I'm passing a string):
I hope you can help me.
Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.