Skip to content

Commit

Permalink
GraphQLUI
Browse files Browse the repository at this point in the history
  • Loading branch information
Aif4thah committed May 31, 2024
1 parent 2136b5d commit 23b8025
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Model/Model.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,17 @@ Classes et Query GraphQL (clients)
public record Client(int Id, string Name, int Country);
public record Country(int Id, string Name);

public record Bank(int RIB, string Name);

public class ClientDetails
{
public int Id { get; set; }
public string Name { get; set; }
public string Country { get; set; }

public string Bank { get; set; }


}

public class ClientDetailsType : ObjectGraphType<ClientDetails>
Expand All @@ -106,6 +112,7 @@ public ClientDetailsType()
Field(x => x.Id);
Field(x => x.Name);
Field(x => x.Country);
Field(x => x.Bank);
}
}

Expand Down
2 changes: 2 additions & 0 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@

app.UseGraphQL<ISchema>("/Client");

app.UseGraphQLPlayground("/GraphQLUI", new GraphQL.Server.Ui.Playground.PlaygroundOptions{GraphQLEndPoint="/Client",SubscriptionsEndPoint="/Client"});


// Arguments :

Expand Down

0 comments on commit 23b8025

Please sign in to comment.