4 ms·
So swagger is bad because "one request and I get your entire schema"? > run any query on the client side" is a terrible idea that's a big mischaracterization.
by bernawil 6y ago
So swagger is bad because "one request and I get your entire schema"?
> run any query on the client side" is a terrible idea
that's a big mischaracterization. A typed query language that lets you tailor your queries a la carte doesn't remotely mean the queries "run on the client side".
- meritt 6y ago> So swagger is bad No, because in Swagger the first step is carefully designing exactly what the inputs and outputs are of each and every API call. Most GraphQL servers you simply point it at a database and it automatically makes your entire schema, including tables and fields that shouldn't be exposed to end users, readily available. > doesn't remotely mean the queries "run on the client side". Sorry, that was poorly written. Obviously the queries are not running on the client side. My point was that the client can provide any query they want and the system will process it.
- bernawil 6y agoMost GraphQL servers you simply point it at a database and it automatically makes your entire schema, including tables and fields that shouldn't be exposed to end users, readily available. You're arguing against auto-generated gql setups, not gql. And it's not even accurate. Anyone that makes that mistake in gql would make it in REST, SOAP or what have you. Auto-generated REST setups are aplenty too, and lately auto-gen tools offer both gql + rest. PostgREST/PostGraphile. Hasura does both too.