Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Setup help] Where I get YourProjectSchema() ? #1

Open
elvismdev opened this issue Jul 28, 2017 · 0 comments
Open

[Setup help] Where I get YourProjectSchema() ? #1

elvismdev opened this issue Jul 28, 2017 · 0 comments

Comments

@elvismdev
Copy link

elvismdev commented Jul 28, 2017

I've trying something like this but seems like I'm passing the wrong thing.

// Register database.
$app->register( new DoctrineServiceProvider(), array( 'db.options' => $app['yml_config']['database'] ) );
// Register Doctrine ORM Service Provider.
$app->register( new DoctrineOrmServiceProvider(), array(
	'orm.proxies_dir'			=> __DIR__ . '/Entity/Proxy',
	'orm.auto_generate_proxies'	=> $app['debug'],
	'orm.em.options'			=> array(
		'mappings' => array(
			array(
				'type'							=> 'annotation',
				'namespace'						=> __NAMESPACE__ . '\\Entity\\',
				'path'							=> __DIR__ . '/Entity',
				'use_simple_annotation_reader'	=> false
				)
			)
		)
	));

// I'm missing something here like $app['orm.em']->getProjectSchema() ?
$schema = $app['orm.em'];
// Mount GraphQL endpoint.
$app->mount('/graphql', new GraphQLControllerProvider($schema));

Coming from the example in the readme still not very clear for me, from where comes or do I get YourProjectSchema() within my existing Silex project code ?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant