File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
src/main/java/graphql/annotations/connection Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 3232@ Retention (RetentionPolicy .RUNTIME )
3333public @interface GraphQLConnection {
3434 /**
35- * By default, a simple List connection is specified, but can be overridden using
36- * this property to allow for more efficient fetching procedures (limiting database queries, etc.)
35+ * By default, a paginated data connection is specified.
36+ * this property allows for more efficient fetching procedures (limiting database queries, etc.)
37+ * NOTE: if you override this, you should also override the validator field, and specify
38+ * your own connection validator
3739 * @return a connection class
3840 */
39- Class <? extends ConnectionFetcher > connection () default EnhancedConnectionFetcher .class ;
41+ Class <? extends ConnectionFetcher > connection () default PaginatedDataConnectionFetcher .class ;
4042
4143 /**
4244 * By default, wrapped type's name is used for naming TypeConnection, but can be overridden
4345 * using this property
4446 * @return the wrapped type's name
4547 */
4648 String name () default "" ;
49+
50+ /**
51+ * By default, the the validator validates a paginated data connection.
52+ * Can be overridden (and should be) if you are using a custom connection
53+ * @return a connection validator
54+ */
55+ Class <? extends ConnectionValidator > validator () default PaginatedDataConnectionTypeValidator .class ;
4756}
You can’t perform that action at this time.
0 commit comments