LOGIN
Ranjan Dailata
Solution Architect. Collaborizm Roundtable.
Steven Reubenstone
51
Mechanical Engineer & Tinkerer of Things. Collaborizm Roundtable.
· New York, NY, USA
QUESTION

Fixing Postgres functions in graphql schema

Hey Ranjan (and community)…I am working on graphQL backend. I’m not entirely sure you even need to know graphQL to fix this issue. Basically in the schema.ts file (https://github.com/sreubenstone/graphqlreactapp/blob/master/schema/schema.ts) in the RESOLVE functions this is where you connect to postgres and send queries. Take a look at how I’m setting this up. One primary issue I am having is that I am not getting a response that graphQL can read. Do I need to modify the results of the response into something GraphQL can understand? I know this seems obvious but I was executing this graphql query and it was actually partially working. And it previous tutorials it does not make it clear what “form” to leave the response. This may be a very noob question but as a new coder it’s confusing to understand what the “shape of a response” should look like and how to interface it with the technology receiving the response (graphql).

3 likes
Like
Award Contribution
Load previous comments
Ranjan Dailata
92
Solution Architect. Collaborizm Roundtable.
· Mysuru, Karnataka, India

Try to modify your code as mentioned in the below article. I am sure, it will work.

https://blog.cloudboost.io/postgresql-and-graphql-2da30c6cde26

Like
1 like
Award Contribution
Steven Reubenstone
51
Mechanical Engineer & Tinkerer of Things. Collaborizm Roundtable.
· New York, NY, USA

Thanks ranjan will take a look

Like
2 likes
Award Contribution
Steven Reubenstone
51
Mechanical Engineer & Tinkerer of Things. Collaborizm Roundtable.
· New York, NY, USA

Ooo haha this girls code is bugged rob showed me

Like
1 like
Award Contribution
Leave a reply...
DISCOVER
CHAT
HIRE
ACTIVITY
FEED
Chat with us!
Help
Write something before you submit it!
Photo updated
Request Sent!
Updated
Copied to Clipboard