CSharpQL is a GraphQL project built using C#. This repository demonstrates the implementation of a GraphQL server, including the setup of queries, mutations, and schema definitions.
-
Clone the repository:
git clone https://github.com/guilhermeytalo/csharpql.git cd csharpql
-
Restore dependencies:
dotnet restore
-
Build the project:
dotnet build
-
Run the GraphQL server:
dotnet run
-
Access the GraphQL playground:
Open your browser and navigate to
http://localhost:5000/graphql
to explore the GraphQL API.
- GraphQL Schema Definition: Defines the schema for your API, including queries, mutations, and types.
- Query Support: Includes sample queries for fetching data.
- Mutation Support: Provides examples of how to modify data using mutations.
- Mock Data Generation: Utilizes the
Bogus
library to generate mock data for testing and development.
query {
sampleQuery {
id
name
description
}
}
mutation {
sampleMutation(input: { name: "Example" }) {
id
name
description
}
}
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Open a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.