Skip to content

Commit

Permalink
- Revert creating the 'getType' expression function
Browse files Browse the repository at this point in the history
- Fix AppVeyor
  • Loading branch information
murtukov committed Nov 30, 2020
1 parent b4dfa0f commit 0fa4305
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 29 deletions.
3 changes: 2 additions & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ init:

install:
- ps: Set-Service wuauserv -StartupType Manual
- cinst -y php composer
- cinst -y php --version=7.4
- cinst -y composer
- refreshenv
- cd c:\tools\php74
- copy php.ini-production php.ini /Y
Expand Down
11 changes: 0 additions & 11 deletions docs/definitions/expression-language.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ All definition config entries can use expression language but it must be explici
- [hasPermission](#haspermission)
- [hasAnyPermission](#hasanypermission)
- [getUser](#getuser)
- [getType](#gettype)
- [Registered variables](#registered-variables)
- [Private services](#private-services)
- [Custom expression functions](#custom-expression-functions)
Expand Down Expand Up @@ -321,16 +320,6 @@ Examples
@=getUser().firstName === 'adam'
```

### getType
**Signature**: <code><b>getType</b>(string <b>$alias</B>): GraphQL\Type\Definition\Type|null</code>

Returns a GraphQL type.

Examples
```yaml
@=getType('Post')
```


## Registered variables:

Expand Down
16 changes: 0 additions & 16 deletions src/ExpressionLanguage/ExpressionFunction/GraphQL/GetType.php

This file was deleted.

2 changes: 2 additions & 0 deletions src/Resources/config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ services:
Overblog\GraphQLBundle\Resolver\TypeResolver:
calls:
- ["setDispatcher", ["@event_dispatcher"]]
tags:
- { name: overblog_graphql.service, alias: typeResolver }

Overblog\GraphQLBundle\Transformer\ArgumentsTransformer:
arguments:
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/App/config/node/mapping/node_type.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Node:
type: relay-node
config:
resolveType: '@=getType(query("node_resolver::typeResolver", value))'
resolveType: '@=typeResolver.resolve(query("node_resolver::typeResolver", value))'

0 comments on commit 0fa4305

Please sign in to comment.