This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let input = { first_name: 'Foo', last_name: 'Bar' }; | |
// application/graphql example | |
/* eslint-disable no-unused-vars */ | |
let configGraphQL = { | |
url: '/graphql', | |
method: 'post', | |
headers: { 'Content-Type': 'application/graphql' }, | |
data: `mutation { user(id: 1, input: ${ JSON.stringify(input) }){ full_name } }` | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// lightweight retrieval of orgId from alias | |
$em = $this->getDoctrine()->getManager(); | |
$query = $em->createQuery('SELECT org.oid FROM AppBundle:Organization org WHERE org.slug = :alias OR org.oid = :alias')->setParameter('alias', $orgAlias); | |
$org = $query->getOneOrNullResult(); | |
if (!$org) throw new \Exception('Not Found', 404); |