Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def field(field, **args):
if isinstance(field, GraphQLField):
return DSLField(field).args(**args)
elif isinstance(field, DSLField):
return field
raise Exception('Received incompatible query field: "{}".'.format(field))
def __getattr__(self, name):
formatted_name, field_def = self.get_field(name)
return DSLField(formatted_name, field_def)