Code Monkey home page Code Monkey logo

graphene-file-upload's Introduction

Build Status PyPI version Downloads

PyPI - Python Version PyPI - Django Version Flask

graphene-file-upload

graphene-file-upload is a drop in replacement for the the GraphQL view in Graphene for Django, and for Flask-Graphql.

It supports multi-part file uploads that adhere to the Multipart Request Spec.

It currently supports Python 2.7 and 3.4+.

Installation:

pip install graphene-file-upload

Usage

To add an upload type to your mutation, import and use Upload. Upload is a scalar type.

from graphene_file_upload.scalars import Upload

class UploadMutation(graphene.Mutation):
    class Arguments:
        file = Upload(required=True)

    success = graphene.Boolean()

    def mutate(self, info, file, **kwargs):
        # do something with your file

        return UploadMutation(success=True)

Django Integration:

To use, import the view, then add to your list of urls (replace previous GraphQL view).

from graphene_file_upload.django import FileUploadGraphQLView

urlpatterns = [
  url(r'^graphql', FileUploadGraphQLView.as_view(graphiql=True)),
]

Flask Integration:

Note that flask-graphql version <2.0 is not supported. At the time of writing this README, you must install flask-graphql with pip install --pre flask-graphql

Simply import the modified view and create a new url rule on your app:

from graphene_file_upload.flask import FileUploadGraphQLView

app.add_url_rule(
    '/graphql',
    view_func=FileUploadGraphQLView.as_view(
      ...
    )
)

Testing

Flask

https://flask.palletsprojects.com/en/1.1.x/testing/#the-testing-skeleton

# Create a fixture using the file_graphql_query helper and `client` fixture.
import os
import json
import tempfile

from flaskr import flaskr
import pytest
from graphene_file_upload.flask.testing import file_graphql_query


@pytest.fixture
def client():
    db_fd, flaskr.app.config['DATABASE'] = tempfile.mkstemp()
    flaskr.app.config['TESTING'] = True

    with flaskr.app.test_client() as client:
        with flaskr.app.app_context():
            flaskr.init_db()
        yield client

    os.close(db_fd)
    os.unlink(flaskr.app.config['DATABASE'])


@pytest.fixture
def client_query(client):
    def func(*args, **kwargs):
        return file_graphql_query(*args, **kwargs, client=client)

    return func

# Test your query using the client_query fixture
def test_some_query(client_query):
    test_file = SimpleUploadedFile(name='test.txt', content=file_text.encode('utf-8'))
    
    response = client_query(
        '''
        mutation testMutation($file: Upload!) {
            myUpload(fileIn: $file) {
                ok
            }
        }
        ''',
        op_name='testMutation'
        files={'file': test_file},
    )

    content = json.loads(response.content)
    assert 'errors' not in content

Django

Writing test using django's test client

Using pytest

To use pytest define a simple fixture using the query helper below

# Create a fixture using the file_graphql_query helper and `client` fixture from `pytest-django`.

import json
import pytest
from graphene_file_upload.django.testing import file_graphql_query

@pytest.fixture
def client_query(client):
    def func(*args, **kwargs):
        return file_graphql_query(*args, **kwargs, client=client)

    return func

# Test your query using the client_query fixture
def test_some_query(client_query):
    test_file = SimpleUploadedFile(name='test.txt', content=file_text.encode('utf-8'))
    
    response = client_query(
        '''
        mutation testMutation($file: Upload!) {
            myUpload(fileIn: $file) {
                ok
            }
        }
        ''',
        op_name='testMutation'
        files={'file': test_file},
    )

    content = json.loads(response.content)
    assert 'errors' not in content

Using unittest

Your endpoint is set through the GRAPHQL_URL attribute on GraphQLFileUploadTestCase. The default endpoint is GRAPHQL_URL = “/graphql/”.

import json

from graphene_file_upload.django.testing import GraphQLFileUploadTestCase

class MutationTestCase(GraphQLFileUploadTestCase):
   def test_some_mutation(self):
        test_file = SimpleUploadedFile(name='test.txt', content=file_text.encode('utf-8'))

        response = self.file_query(
            '''
            mutation testMutation($file: Upload!) {
                myUpload(fileIn: $file) {
                    ok
                }
            }
            ''',
            op_name='testMutation',
            files={'file': test_file},
        )

        # This validates the status code and if you get errors
        self.assertResponseNoErrors(response)

Contributing:

If you'd like to contribute, please run the test suite prior to sending a PR.

In order to run the testing environment, create a virtual environment, install tox, and run the tox commands:

$ python3 -m venv venv
$ source venv/bin/activate
$ make install
# You may have to deactivate and reactivate to have access to the tox command,
# depending on your system.

# Run the test suite with the versions of python you have installed
$ tox
# Alternatively, if you're using something like pyenv and can easily install
# Multiple versions of python, then try running the following command
$ tox

# If for some reason you need to recreate the tox environment (e.g. a new
# dependency has been added since you last ran it, add the -r flag to the
# tox command)
$ tox -r {...additional flags...}

Check out pyenv if you'd like a simple way of installing multiple python versions to test out.

Packaging for PyPi:

Run

$ make deploy

graphene-file-upload's People

Contributors

bogdal avatar davidroeca avatar fhennig avatar garyd203 avatar jackton1 avatar jakubczaplicki avatar lmcgartland avatar lucas-bremond avatar mike667 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

graphene-file-upload's Issues

How to handle multiple files?

Thank you for your wonderful package. I love it.

I'm trying to implement file upload into my django project. I've found that multiple file can be handled by apollo-upload-client, but I couldn't find whether it is possible to be handled by server side with graphene-file-upload in documentation.

Can you advise me of how to handle multiple files with graphene-file-upload?

Flask test in README uses django import

When using the exmaple test I noticed this import:

from graphene_file_upload.django.testing import file_graphql_query

I could not find this import within the package.

Run query from Postman

Hi guys.
First of all, congrats for this very useful lib.

I wrote a very basic mutation for file upload:

class TestMutation(graphene.Mutation):
    class Arguments:
        sql_file = Upload()

    Output = OperationStatusRetType

    def mutate(self, info, sql_file_ref):
            sql_file = info.context.FILES.get(sql_file_ref)
            sql_query_template = sql_file.read().decode('utf-8')
            sql_file_names = sql_file.names
            in_memory_file = io.StringIO(sql_query_template)
            put_s3_object(s3, AWS_DEFAULT_S3_BUCKET, in_memory_file.getvalue(), sql_file_names.split('/')[-1])

        return AddDatasetRetType(sqlFilePath=sql_file_names.split('/')[-1],
                                 operationStatus=OperationStatusRetType(success=True))

and I consume it this way:

mutation Test {
  testMutation(sql_file: "test.png") {
    success
    error
  }
}

I would like to test it with Postman, posting the file using the POST form-data option, like in the pic:

image

but I get the error "Must provide query string" as generally in GraphQL the querystring should be in the form body.

In the headers "Content-Type" is "application/graphql".

Do you know how I can test my GraphQL endpoint using Postman?
Also is still not clear to me if I need to assign a value to the Upload field ("sql_file" in this case) or it can be left empty.

Thanks

Object of type InMemoryUploadedFile is not JSON serializable

When I use the FileUploadGraphQLView view, messages thrown by graphene can not return them, Only replies

Object of type InMemoryUploadedFile is not JSON serializable

The frontend developers will not know what field is missing or what was the error that I identify by graphene

`tests` folder is included in packages

packages argument (setup.py) should contain only main package: graphene_file_upload

At the moment after installation I see tests folder in my site-packages, which override local modules

How use Upload scalar with DjangoModelFormMutation

Hello,
I am just wondering how is possible to use Upload scalar with DjangoModelFormMutation?
It always generates a thumbnail as a String and not Upload scalar.

Mutation - fields

createPost ( input CreatePostInput! ) CreatePostPayload

and CreatePostInput has these fields:

title String!
content String!
thumbnail String! # need to change this from String! to Upload!
id ID
clientMutationId String

How is possible to force a thumbnail field to use Upload scalar instead of String, please?


I am using this code:

from django.db import models
import graphene
from graphene_django import DjangoObjectType
from graphene_django.forms.mutation import DjangoModelFormMutation
from graphene_file_upload.scalars import Upload


class Post(models.Model):
    title = models.CharField(max_length=128)
    slug = models.SlugField(editable=False)
    content = models.TextField()  # markdown
    thumbnail = models.ImageField(upload_to='%Y/%m/%d/', width_field='width', height_field='height')
    width = models.PositiveIntegerField(editable=False)
    height = models.PositiveIntegerField(editable=False)
    created = models.DateTimeField(auto_now_add=True)
    modified = models.DateTimeField(auto_now=True)


class PostForm(ModelForm):
    class Meta:
        model = Post
        fields = (
            'id',
            'title',
            'content',
            'thumbnail',
        )


class PostType(DjangoObjectType):
    class Meta:
        model = Post
        fields = (
            'id',
            'title',
            'slug',
            'content',
            'thumbnail',
            'width',
            'height',
            'created',
            'modified'
        )


class CreatePost(DjangoModelFormMutation):
    post = graphene.Field(PostType)

    class Meta:
        form_class = PostForm



class Mutation(graphene.ObjectType):
    create_post = CreatePost.Field()


schema = graphene.Schema(mutation=Mutation)

Is possible to override this somehow, please?
Thank you!

Port this package to Flask

Hi, I've ported this package successfully to Flask and I want to create a PR for it.

Particularly, I make two changes:

  • from graphene_django.views import GraphQLView to from flask_graphql import GraphQLView
  • and request_type = request.META.get("CONTENT_TYPE") to request_type = request.mimetype

It's not clear for me to make this works for both Flask and Django. Do you have any idea?

Testing file upload API

Hi, I already implemented the package in my schema, but I haven't found a tool to test this API.

I already use postman and graphiql with other queries and mutations but haven't found a way to test image uploads.

any thoughts?

cannot import name Field

Hello, I found a little problem but I don't know what caused it, when I want to try making a file upload an error appears like this :

ImportError: cannot import name 'Field'

I try to follow the provided example, but still give me the same results, can anyone help?

No need for redundant dependencies

I want to use it for my Django project, why it creates extra dependencies? Why do I need flask?

[package.extras]
all = ["Flask (>=1.0.2)", "graphene (>=2.1.2)", "Flask-Graphql (>=2.0.0)", "graphene-django (>=2.0.0)"]
django = ["graphene-django (>=2.0.0)"]
flask = ["Flask (>=1.0.2)", "graphene (>=2.1.2)", "Flask-Graphql (>=2.0.0)"]

Import module issue after updating to latest version

There is a traceback:

from graphene_file_upload.django import FileUploadGraphQLView
  File "/usr/local/lib/python3.6/site-packages/graphene_file_upload/django/__init__.py", line 4, in <module>
    from .utils import place_files_in_operations
ModuleNotFoundError: No module named 'graphene_file_upload.django.utils'

from graphene_file_upload.flask import FileUploadGraphQLView fails with this error:

Traceback (most recent call last):
  File "server.py", line 4, in <module>
    import graphene_file_upload.flask
  File "~/.local/share/virtualenvs/backend-JODmqDQ7/lib/python2.7/site-packages/graphene_file_upload/flask.py", line 1, in <module>
    from flask import request
ImportError: cannot import name request

Potentially I am just using this incorrectly?

testing with curl, issues

i added the package to my setup, and tried to test it using curl from the example of https://github.com/jaydenseric/graphql-multipart-request-spec, i guess it should be working. modified a bit.

upload mutation:

class UploadMutation(graphene.Mutation):
    class Arguments:
        file = Upload(required=True)

    success = graphene.Boolean()

    def mutate(self, info, file, **kwargs):
        # file parameter is key to uploaded file in FILES from context
        uploaded_file = info.context.FILES.get(file)
        # do something with your file
        return UploadMutation(success=True)

class Mutation(graphene.ObjectType):
    upload_mutation = UploadMutation.Field()

i did the ModifiedGraphQLView modification as well.

when i run the current command:

curl http://localhost:8000/graphql -F operations='{ "query": "mutation ($file: Upload!) {
 uploadMutation(file: $file) { id } }", "variables": { "file": null } }' -F map='{ "0": ["variables.file"] }' -F 0=@"C:\
Users\William S. Hansen\Documents\upload.txt"

i only changed the mutation name, the uri, and the path to the file.

i get the following error:

Internal Server Error: /graphql
Traceback (most recent call last):
  File "C:\Users\William S. Hansen\source\repos\web\PersonalDataApi\PersonalDataApi\env\lib\site-packages\django\core\handlers\exception.py", line 35, in inner
    response = get_response(request)
  File "C:\Users\William S. Hansen\source\repos\web\PersonalDataApi\PersonalDataApi\env\lib\site-packages\django\core\handlers\base.py", line 128, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "C:\Users\William S. Hansen\source\repos\web\PersonalDataApi\PersonalDataApi\env\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "C:\Users\William S. Hansen\source\repos\web\PersonalDataApi\PersonalDataApi\env\lib\site-packages\django\views\generic\base.py", line 69, in view
    return self.dispatch(request, *args, **kwargs)
  File "C:\Users\William S. Hansen\source\repos\web\PersonalDataApi\PersonalDataApi\env\lib\site-packages\django\utils\decorators.py", line 62, in _wrapper
    return bound_func(*args, **kwargs)
  File "C:\Users\William S. Hansen\source\repos\web\PersonalDataApi\PersonalDataApi\env\lib\site-packages\django\utils\decorators.py", line 142, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "C:\Users\William S. Hansen\source\repos\web\PersonalDataApi\PersonalDataApi\env\lib\site-packages\django\utils\decorators.py", line 58, in bound_func
    return func.__get__(self, type(self))(*args2, **kwargs2)
  File "C:\Users\William S. Hansen\source\repos\web\PersonalDataApi\PersonalDataApi\env\lib\site-packages\graphene_django\views.py", line 119, in dispatch
    request, data, show_graphiql)
  File "C:\Users\William S. Hansen\source\repos\web\PersonalDataApi\PersonalDataApi\env\lib\site-packages\graphene_django\views.py", line 149, in get_response
    request, data)
  File "C:\Users\William S. Hansen\source\repos\web\PersonalDataApi\PersonalDataApi\env\lib\site-packages\graphene_file_upload\__init__.py", line 47, in get_graphql_params
    raise e
  File "C:\Users\William S. Hansen\source\repos\web\PersonalDataApi\PersonalDataApi\env\lib\site-packages\graphene_file_upload\__init__.py", line 30, in get_graphql_params
    operations = json.loads(operations)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\json\__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\json\decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\json\decoder.py", line 355, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 3 (char 2)

is it the request that is wrong, or what am i not getting?

what is it with those double quotes?

it seems like the curl command is also complaining a bit, from the terminal:

curl: (6) Could not resolve host: ($file
curl: (6) Could not resolve host: Upload!)
curl: (3) [globbing] unmatched brace in column 1
curl: (6) Could not resolve host: uploadMutation(file
curl: (6) Could not resolve host: $file)
curl: (3) [globbing] unmatched brace in column 1
curl: (6) Could not resolve host: id
curl: (3) [globbing] unmatched close brace/bracket in column 1
curl: (3) [globbing] unmatched close brace/bracket in column 1

thanks :)

Add support for using django's TestClient

This should extend GraphQLTestCase with support for file mutation test.

NOTE This is a working code sample

    from django.test import Client, TestCase

    DEFAULT_GRAPHQL_URL = "/graphql/"

    def file_graphql_query(self, query, op_name=None, input_data=None, variables=None, headers=None, files=None, client=None, graphql_url=None):

        if not files:
            raise ValueError('Missing required argument "files": Use `self.query` instead.')
        
        client = client or Client()
        headers = headers or {}
        variables = variables or {}
        graphql_url = graphql_url or DEFAULT_GRAPHQL_URL
        map_ = {}

        for k in files.keys():
            map_[k] = [f'variables.{k}']
            if k not in variables:
                variables[k] = None

        body = {'query': query}
        if op_name:
            body['operationName'] = op_name
        if variables:
            body['variables'] = variables
        if input_data:
            if 'variables' in body:
                body['variables']['input'] = input_data
            else:
                body['variables'] = {'input': input_data}

        data = {
            'operations': json.dumps(body),
            'map': json.dumps(map_),
            **files,
        }
        if headers:
            resp = client.post(graphql_url, data, **headers)
        else:
            resp = client.post(graphql_url, data)

        return resp

Usage

response = file_query(
            '''
            mutation uploadImageMutation($id: ID!, $image: Upload!) {
                uploadImage(id: $id, image: $image) {
                    user {
                        id
                    }
                }
            }
            ''',
            op_name='uploadImageMutation',
            variables={'id': test_instance.pk},
            files={'image': image_file}
        )

TODO:

  • Integrate into graphene_file_upload/django package

Is it possible to upload a file optionally?

I have a mutation where I upload a file and other parameters too but this file can be omitted or included if need be. I am using graphene-file-upload for this, but when I try to omit the file from the request, I get the error.
In the operations section of my insomnia/postman, I remove the file variable:
from:
{ "query" : "mutation($file: Upload!, $name: String!){createPerson(file:$file, name: $name){success, errors}}", "variables" : { "file" : null, "name": "Kate", } }

to:
{ "query" : "mutation( $name: String!){createPerson(name: $name){success, errors}}", "variables" : { "name": "Kate", } }

The error:
{ "errors": [ { "message": "mutate() missing 1 required positional argument: 'file'", "locations": [ { "line": 1, "column": 61 } ], "path": [ "createPerson" ] } ], "data": { "createPerson": null } }
I guess since this file is included in the parameters of the mutate method.
Is there a way I could work around this? Thanks

Error: django.utils.datastructures.MultiValueDictKeyError: '1'

Hello Imcgartland,

I've been busy all day with trying to upload an image to django by react-native. After reading a lot I landed at graphene-file-upload. Unfortunately, I do not get it to work and I hope you can help.

I get the following error message:

Request Method: POST
http://192.168.2.22:8000/graphql/
2.2.6
MultiValueDictKeyError
'1'
/backend/env/lib/python3.7/site-packages/django/utils/datastructures.py in getitem, line 80
/backend/env/bin/python
3.7.4
['/backend', '/Applications/PyCharm.app/Contents/helpers/pydev', '//backend', '/Applications/PyCharm.app/Contents/helpers/pycharm_display', '/Applications/PyCharm.app/Contents/helpers/third_party/thriftpy', '/Applications/PyCharm.app/Contents/helpers/pydev', '/Library/Caches/PyCharm2019.2/cythonExtensions', '/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python37.zip', '/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7', '/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload', '/backend/env/lib/python3.7/site-packages', '/Applications/PyCharm.app/Contents/helpers/pycharm_matplotlib_backend']
Fri, 18 Oct 2019 17:17:42 +0000

My request is the following:

accept: */*
authorization: JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6InVsbG1hbm4uaW5AZ21haWwuY29tIiwiZXhwIjoxNTcwNzg0Njk2LCJvcmlnSWF0IjoxNTcwNzg0Mzk2fQ.JOsSqFIkwRw5lrd6easuWeKYES346qzq9_jFbp8m9Vw
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryyhscsCwqLniB9NlA
Origin: file://

------WebKitFormBoundaryyhscsCwqLniB9NlA
Content-Disposition: form-data; name="operations"

{"operationName":"UploadEventPicture","variables":{"file":null},"query":"mutation UploadEventPicture($file: Upload!) {\n  uploadEventPicture(file: $file) {\n    success\n    __typename\n  }\n}\n"}
------WebKitFormBoundaryyhscsCwqLniB9NlA
Content-Disposition: form-data; name="map"

{"1":["variables.file"]}
------WebKitFormBoundaryyhscsCwqLniB9NlA
Content-Disposition: form-data; name="1"

[object Object]
------WebKitFormBoundaryyhscsCwqLniB9NlA--

On the client-side I´m using 'apollo-upload-client' as described on their page.

I can see in the debugger that the error occurs in this function: (graphene_file_upload/utils.py)

def place_files_in_operations(operations, files_map, files):
    """Replaces None placeholders in operations with file objects in the files
    dictionary, by following the files_map logic as specified within the 'map'
    request parameter in the multipart request spec"""
    path_to_key_iter = (
        (value.split('.'), key)
        for (key, values) in iteritems(files_map)
        for value in values
    )
    # Since add_files_to_operations returns a new dict/list, first define
    # output to be operations itself
    output = operations
    for path, key in path_to_key_iter:
        file_obj = files[key]
        output = add_file_to_operations(output, file_obj, path)
    return output

-> file_obj = files[key]

the files array is empty.

Do you have an idea what I´m doing wrong?

Integrate with a CI service

Now that there are tests, it would be nice to set up continuous integration, which automatically runs them and notifies a PR reviewer that the build succeeded or failed.

Could be used with something like Travis CI which is free for open source projects and just requires a .travis.yml file. The travis docs mention how to integrate with tox in the file. This is a simple stack overflow answer that mentions how to run tox appropriately in .travis.yml

Is this project still alive ?

Hi,

I wrote just to say thanks for this package and to ask if this project was still alive because from 2018 i don't see any commit.

Example uploading a video

I've been trying to find an example of uploading an mp4 using this library and I haven't been able to find anything.

These tickets are relevant:
#29 (Has examples for images and text, but not video)
#38

I am facing serious probelem, i am getting this error {message: "mutate() missing 1 required positional argument: 'file'",…}

i have the following mutation code

import graphene
from graphene_file_upload import Upload
from graphene_django import DjangoObjectType
from .models import realEstateAgencies

class CreateAgency(graphene.Mutation):
    id = graphene.UUID()
    authorName = graphene.String()
    authorEmail = graphene.String()
    authorPhone = graphene.Int()
    agencyName = graphene.String()
    agencyAddress = graphene.String()
    agencyLogo = Upload() 

    class Arguments:
        authorName = graphene.String()
        authorEmail = graphene.String()
        authorPhone = graphene.Int()
        agencyName = graphene.String()
        agencyAddress = graphene.String()
        agencyLogo =   Upload()

    def mutate(self, info, file, **kwargs): 
        authorName = kwargs.get('authorName')
        authorEmail = kwargs.get('authorEmail')
        authorPhone = kwargs.get('authorPhone')
        agencyName = kwargs.get('agencyName')
        agencyAddress = kwargs.get('agencyAddress')
        agencyLogo = info.context.FILES.get(file) 

        actionCreate = realEstateAgencies(
            authorName = authorName,
            authorEmail = authorEmail,
            authorPhone = authorPhone,
            agencyName = agencyName,
            agencyAddress = agencyAddress,
            agencyLogo =   agencyLogo
        )
        actionCreate.save()
        
        return CreateAgency(
            id = actionCreate.id
        )

i am keeping getting the error i have even try to remove kwargs and leave only 3 parameraters and use info.context.get('otherData') but still facing the problem

thanks in advance for help

No UI example found

We are trying to use this in our project not able to create a ui not even properly test.we need an documentation/ examples including ui

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.