Questions tagged [graphql]
For questions about GraphQL, an API technology designed to describe the complex, nested data dependencies of modern web applications.
20 questions
0
votes
1
answer
138
views
Should GraphQL request for calculated object be mutation or query?
CreateCustomer is clearly a mutation.
GetCustomer is clearly a query.
But what would be some CalculateProductPriceForThisAmazingCustomer?
Is it a query, because no price is stored (no data written), ...
1
vote
1
answer
2k
views
Difference between Resolvers and Controllers?
I may be overthinking it, but are controllers and resolvers the same thing in web applications? Coming from the MERN stack, everyone used to call these request processing functions "controllers,&...
3
votes
3
answers
5k
views
In RESTful APIs, what's the proper way to have different resource properties based on user authorization?
I'm struggling with defining proper endpoints for a RESTful API, given the following requirements:
We have an existing /customers endpoint, which when called with the GET verb, returns a list of ...
1
vote
1
answer
431
views
Doesn't Apollo Federation for GraphQL services encourage bad software design?
Background
In the scenario GraphQL Federation was designed for, you have numerous GraphQL microservices in the backend, each with their own Schema Definition Language (SDL).
Theoretically, these ...
10
votes
2
answers
2k
views
When to choose Graphql over REST
We currently have an application with various frontends, a backend with a python tornado server, MongoDB and a "REST" API (that isn't very RESTful) so are looking to update to a version 2.
A ...
1
vote
1
answer
513
views
What are the differences between server-server communication vs client-server communication
How does server-server communication compare to client-server communication?
I'm wondering if there are any performance benefits when putting a GraphQL layer in between my client-side app and my rest-...
1
vote
0
answers
118
views
Strategy for a worker microservice to communicate with GraphQL API
I am trying to find the best way for a microservice to communicate with GraphQL
Basic scenario:
Client subscribed to GraphQL via Subscriptions (WebSockets)
Client creates an Item using Mutation which ...
-3
votes
2
answers
325
views
Cloudfront distribution having multiple domains
I am developing a multi-tenant project that will be a kind of micro "ecommerce" and therefore customers will be able to create their own stores and will be able to choose between creating a ...
4
votes
0
answers
387
views
How do I architect reordering in database?
I'm building a todo list app and using react-beautiful-dnd on the frontend to allow users to reorder tasks. I'm trying to work out how to persist changes to the database when a user reorders items.
...
-2
votes
1
answer
321
views
Should graphql api implementation select specific fields from database before resolving?
I recently had to optimize my graphql API server by selecting only specific fields from the database before returning the actual result to the client. For example, let's say my graphql schema has the ...
1
vote
0
answers
44
views
Offloading database joins to IOT devices
Solution as it is right now
I have this solution where I gather information from a proprietary product of a different company in various sites. The solution is based on a single go binary that ...
4
votes
1
answer
663
views
What *really* is the difference between relational and non-relational data?
Here is where I am at right now: I know that relational data, like that found in relational databases like MySQL or Postgres, is relational because there are relations between the tables. That is the ...
1
vote
4
answers
211
views
Performance issues in an pseudo microservice environment
I'm currently working on a project which is build as a microservice architecture.
We have one "Gateway" which aggregates the data coming from the different microservices to return one aggregated ...
0
votes
1
answer
357
views
GraphQL results in a very large Query and Mutator file for Enterprise Monolith
I am investigating a good maintainable architecture for GraphQL. In particular we want to migrate a REST app to GraphQL. Specifically I am using .NET.
I am following the tutorial here: https://...
0
votes
2
answers
145
views
Is there an industry precedent for SQL pass-through endpoints? [closed]
There is an increasing interest toward GraphQL and Falcor across the Web. Each time I see an article or discussion about those, I get reminded about SQL, at least its DQL part.
Obviously, sending raw ...
2
votes
0
answers
111
views
Where to store the state of a complex form in React?
Let us consider a complex form of registering a driver and owner.
The driver will have all these fields:
driver = {
firstName: "xyz",
lastName: "abc",
phone: "1234",
email: "[email protected],
licence: "...
9
votes
4
answers
2k
views
"REST Vs GraphQL" is it a correct comparison?
I saw in many sites that compare REST with GraphQL. after investigating this concern (actually my concern) that, "is it a correct comparison?", I being more confused.
Since the REST has a different ...
1
vote
0
answers
63
views
Are REST Resources and GraphQL Object Types conceptually equal?
I'm in the process of outlining the intended business logic of a web service. At this point, I'm not too concerned with implementation details. On the contrary, I'm looking for ways to abstract them ...
7
votes
1
answer
508
views
What architecture layer is GraphQL part of?
I'm currently dealing with a GraphQL project with poor architecture. I read about where to put AuthZ checks and they refer to the "business layer" as to be called from a GraphQL resolver.
Up till now,...
6
votes
2
answers
248
views
GraphQL - Should I expose link tables?
I am experimenting with converting an API to GraphQL, and I have a database that has many-to-many relationships that are stored via link tables; something like this:
CREATE TABLE accounts
(
id int,
...