DEV Community

Discussion on: Entity Framework DotNet Core with GraphQL and SQL Server (using HotChocolate)

Collapse
 
bossjake profile image
BossJake • Edited

Hey Michael, I'm new to GraphQL hot chocoloate but this is really a good example and an easy tutorial to follow. Thank you!.

Question #1: In your example, you use "code" as a parameter for the LocationQueries.GetLocation(). If I want to use Id or Active, how do we implement this?

Can we do it like GetLocationByCode or GetLocationByActive. Is this even the right approach? I've done it this way. Is this correct?

dev-to-uploads.s3.amazonaws.com/i/...

Question #2: Do you have an example on how we can query or get the data from a Rest API?
i.e. I want to fetch the data from an http rest api and expose it in the Location Query Type.