Add queryable capability contracts and checked GraphQL artifacts
This commit is contained in:
@@ -100,7 +100,7 @@ operationMember
|
||||
;
|
||||
|
||||
valueMember
|
||||
: VALUE identifier ID stringLiteral COLON valueType
|
||||
: queryReadContract? VALUE identifier ID stringLiteral COLON valueType
|
||||
LBRACE valueMemberOperation* RBRACE
|
||||
;
|
||||
|
||||
@@ -111,10 +111,14 @@ valueMemberOperation
|
||||
;
|
||||
|
||||
relationshipMember
|
||||
: RELATION identifier ID stringLiteral COLON cardinality targetConstraint ORDERED?
|
||||
: queryReadContract? RELATION identifier ID stringLiteral COLON cardinality targetConstraint ORDERED?
|
||||
LBRACE relationshipOperation* RBRACE
|
||||
;
|
||||
|
||||
queryReadContract
|
||||
: QUERYABLE RPC?
|
||||
;
|
||||
|
||||
relationshipOperation
|
||||
: RESOLVE ID stringLiteral SEMI
|
||||
| CONNECT ID stringLiteral SEMI
|
||||
@@ -138,6 +142,21 @@ packageExport
|
||||
: packageOperationExport
|
||||
| packageFunctionExport
|
||||
| packageConstructorExport
|
||||
| packageQuery
|
||||
;
|
||||
|
||||
packageQuery
|
||||
: QUERY identifier ID stringLiteral ROOT interfaceType
|
||||
DOCUMENT stringLiteral OPERATION stringLiteral LBRACE queryClause* RBRACE
|
||||
;
|
||||
|
||||
queryClause
|
||||
: FRAGMENTS stringLiteral SEMI
|
||||
| VIEW identifier AS interfaceType SEMI
|
||||
| MAX identifier INTEGER SEMI
|
||||
| ALLOW interfaceType DOT identifier identifier stringLiteral SEMI
|
||||
| WATCH SEMI
|
||||
| POLL INTEGER stringLiteral SEMI
|
||||
;
|
||||
|
||||
packageOperationExport
|
||||
@@ -252,7 +271,7 @@ relationshipMaterializationDecl
|
||||
;
|
||||
|
||||
operationBindingDecl
|
||||
: BIND memberOperationRef TO operationProvider SEMI
|
||||
: BIND memberOperationRef TO operationProvider (QUERY_REASON stringLiteral)? SEMI
|
||||
;
|
||||
|
||||
memberOperationRef
|
||||
@@ -371,6 +390,16 @@ jsonArray
|
||||
identifier
|
||||
: IDENTIFIER
|
||||
| SOURCE
|
||||
| QUERY
|
||||
| ROOT
|
||||
| DOCUMENT
|
||||
| FRAGMENTS
|
||||
| VIEW
|
||||
| MAX
|
||||
| ALLOW
|
||||
| POLL
|
||||
| RPC
|
||||
| QUERYABLE
|
||||
;
|
||||
|
||||
stringLiteral
|
||||
@@ -378,6 +407,17 @@ stringLiteral
|
||||
;
|
||||
|
||||
WORKSPACE: 'workspace';
|
||||
QUERY: 'query';
|
||||
ROOT: 'root';
|
||||
DOCUMENT: 'document';
|
||||
FRAGMENTS: 'fragments';
|
||||
VIEW: 'view';
|
||||
MAX: 'max';
|
||||
ALLOW: 'allow';
|
||||
POLL: 'poll';
|
||||
QUERYABLE: 'queryable';
|
||||
RPC: 'rpc';
|
||||
QUERY_REASON: 'query-reason';
|
||||
TYPE: 'type';
|
||||
OBJECT: 'object';
|
||||
STORABLE: 'storable';
|
||||
|
||||
Reference in New Issue
Block a user