You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Configuration](docs/configuration.md) - Database configuration and settings
30
32
-[API Reference](docs/api-reference.md) - Complete API documentation
@@ -78,6 +80,243 @@ var result = executor.Execute(@"{
78
80
}");
79
81
```
80
82
83
+
## Prisma-Style Filtering & Sorting
84
+
85
+
SharpGraph supports Prisma-style filtering and sorting through Connection types. This provides an intuitive, GraphQL-native way to query and sort data.
86
+
87
+
### Filtering with `where`
88
+
89
+
Filter records using field-level conditions:
90
+
91
+
```graphql
92
+
query SearchCharacters {
93
+
characters {
94
+
items(where: {name: {contains: "Luke"}}) {
95
+
id
96
+
name
97
+
characterType
98
+
}
99
+
}
100
+
}
101
+
```
102
+
103
+
**Available filter operators:**
104
+
-`equals`: Exact match
105
+
-`contains`: String contains (case-insensitive)
106
+
-`startsWith`: String starts with
107
+
-`endsWith`: String ends with
108
+
-`gt`: Greater than (for numbers)
109
+
-`lt`: Less than (for numbers)
110
+
-`gte`: Greater than or equal
111
+
-`lte`: Less than or equal
112
+
113
+
**Combined filters with AND/OR/NOT:**
114
+
115
+
```graphql
116
+
queryFindHumans {
117
+
characters {
118
+
items(where: {
119
+
AND: [
120
+
{characterType: {equals: "Human"}}
121
+
{name: {contains: "Solo"}}
122
+
]
123
+
}) {
124
+
id
125
+
name
126
+
characterType
127
+
}
128
+
}
129
+
}
130
+
```
131
+
132
+
### Sorting with `orderBy` (Prisma-style)
133
+
134
+
Sort by one or multiple fields using Prisma's intuitive syntax:
0 commit comments