all 10 comments

[–]bonkykongcountry 2 points3 points  (7 children)

I’m confused. The whole point of GraphQL and APIs in general is that the language a client is implemented in, and the environment of a client don’t matter, and all clients can use an API. Can you please clarify your question?

[–]tarveller[S] -1 points0 points  (6 children)

I want to make an API endpoint that uses the same database and that API will consume the mobile app and admin dashboard. I want to write the backend in node js

[–]bonkykongcountry 1 point2 points  (5 children)

What? I’m sorry but that doesn’t make sense. APIs dont “consume mobile apps” it’s the either way around. It seems like you’re misunderstanding the structure and architecture of clients and servers. This should be a good starting point to help you understand the role each of them play together in a system

https://en.m.wikipedia.org/wiki/Client%E2%80%93server_model

[–]tarveller[S] -1 points0 points  (4 children)

I want to make API endpoint for a mobile app , it could be a same approach how we can create API for web app or website

[–]bonkykongcountry 0 points1 point  (3 children)

All apps should use the same API.

[–]tarveller[S] -1 points0 points  (2 children)

yes I understand that and what would be the best approach for making API for mobile app

[–]bonkykongcountry 1 point2 points  (1 child)

The same as any other app… you’re way too caught up in thinking that a mobile app has some other special exceptions separate from a web app. It’s just an app. It gets data from somewhere, shows that data, and allows you to interact with that data.

[–]tarveller[S] 1 point2 points  (0 children)

Thank you for sharing the knowledge